Граф коммитов

28076 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek 6137441813 Tweak RegionStore's handling of lazy compound values to use the 'Default' versus 'Direct' binding key, thus allowing specific elements of an array/struct to be overwritten without
invalidating the entire binding.  Fixes PR 9455.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127796 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 03:51:51 +00:00
Ted Kremenek 1cbc31515e Extend -Wuninitialized to support vector types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127794 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 03:06:11 +00:00
Ted Kremenek 0a65f94672 Rename -Wuninitialized-maybe to -Wconditional-uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127793 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 03:06:07 +00:00
Ken Dyck dc496395fb Convert NextOffsetInBytes to CharUnits and rename to NextOffsetInChars. No
change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127787 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 01:33:18 +00:00
Matt Beaumont-Gay 17d12fec91 Politely inform GCC that we will never fall off the end of that switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127783 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 00:46:34 +00:00
Daniel Dunbar 7187fac0f1 Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
not being consistent at all with other parts of the GCC implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127777 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 00:07:34 +00:00
Douglas Gregor 04a9eb3f0d When libclang visits a translation unit via clang_visitChildren(),
walk the preprocessing record *before* walking the declarations, so
they we pretend that we actually respect the phases of translation.

We still walk the preprocessing record after the declarations when
performing token annotation or finding the cursor at a location, since
those routines depend on those semantics.

Fixes <rdar://problem/9137195>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127776 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 23:23:30 +00:00
Joerg Sonnenberger 9a2927c4e6 Use C as fallback type if in C preprocessor mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127769 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 22:45:02 +00:00
Eli Friedman 545aa7a0f5 PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127768 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 22:34:09 +00:00
Ted Kremenek 5e48bcfa7f Compress argument processing in ccc-analyzer. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127758 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 21:10:42 +00:00
Abramo Bagnara 0daaf32723 Use ElaboratedType also for C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 20:16:18 +00:00
Joerg Sonnenberger 0ce89c6b36 Refactor program name logic. Extend it to infer the target triple from
the program name, if it includes it as proper prefix. This makes calling
clang with -ccc-host-triple x86_64-linux the same as calling it with the
name x86_64-linux-clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 20:15:43 +00:00
Douglas Gregor eef7ac5837 Detect attempts to provide a specialization of a function within a
dependent scope and produce an error (rather than crashing). Fixes PR8979.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127749 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 19:27:09 +00:00
Argyrios Kyrtzidis 3cd0128ce4 Having FileManager::getFile always open the file, brought much consternation and leaking of file descriptors.
Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it
false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters.

Fixes rdar://9139899.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127748 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 19:17:25 +00:00
Douglas Gregor db2eae639d Clean up our handling of template-ids that resolve down to a single
overload, so that we actually do the resolution for full expressions
and emit more consistent, useful diagnostics. Also fixes an IRGen
crasher, where Sema wouldn't diagnose a resolvable bound member
function template-id used in a full-expression (<rdar://problem/9108698>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127747 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 19:16:25 +00:00
Sandeep Patel 1040c227ef Fix duplicate argument processing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127746 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 19:14:34 +00:00
Peter Collingbourne 28ac87e1a2 Support for printing/dumping static asserts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127744 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 18:37:27 +00:00
Peter Collingbourne 7839febe58 Remove a duplicate language feature
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 18:35:34 +00:00
Chandler Carruth b5142bb7af Add a 'RawPath' parameter to the PPCallbacks interface. This allows
clients to observe the exact path through which an #included file was
located. This is very useful when trying to record and replay inclusion
operations without it beind influenced by the aggressive caching done
inside the FileManager to avoid redundant system calls and filesystem
operations.

The work to compute and return this is only done in the presence of
callbacks, so it should have no effect on normal compilation.

Patch by Manuel Klimek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127742 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 18:34:36 +00:00
Douglas Gregor 60b3e38d42 Don't indescriminately print overload candidates when we have invalid
operands to a binary expression; it doesn't make sense in all
contexts. The right answer would be to see if the user forgot at ().

Fixes <rdar://problem/9136502>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127740 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 18:21:05 +00:00
Douglas Gregor eed5ddc255 Allow function calls to dereferenced member pointers of
pointer-to-function type. Fixes <rdar://problem/9065289>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127739 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 17:42:23 +00:00
Douglas Gregor c9977d09a2 Make sure that we always pop a function's scope *before* we call
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.

Fixes PR9495.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127738 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 17:05:57 +00:00
Douglas Gregor 250e7a74d5 When we're inserting a synthesized label declaration for a
forward-looking "goto" statement, make sure to insert it *after* the
last declaration in the identifier resolver's declaration chain that
is either outside of the function/block/method's scope or that is
declared in that function/block/method's specific scope. Previously,
we could end up inserting the label ahead of declarations in inner
scopes, confusing C++ name lookup.

Fixes PR9491/<rdar://problem/9140426> and <rdar://problem/9135994>.

Note that the crash-on-invalid PR9495 is *not* fixed. That's a
separate issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127737 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 16:39:03 +00:00
David Chisnall 4d000b322f Fix foreign exception handling (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127736 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 15:44:28 +00:00
Abramo Bagnara 24f4674e69 Added missing methods to get Designators source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127735 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 15:08:46 +00:00
NAKAMURA Takumi 4d85942a1b test/Driver/hello.c: Tweak for cygming.
- Driver's name may be "clang(-\d.\d).exe".
  - Emitted executable file is named as "%t.exe". It must be harmless on other OS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127729 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 13:51:46 +00:00
Ted Kremenek 432c478fe0 Teach CFGBuilder that the 'default' branch of a switch statement is dead if all enum values in a switch conditioned are handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127727 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 04:32:01 +00:00
John McCall a5bcb8fec4 Don't emit read barriers for reading __weak __block variables
in non-GC mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 02:53:38 +00:00
Ted Kremenek d5fde2106a VariadicMethodTypeChecker: don't warn for null pointer constants passed to variadic Objective-C methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 00:22:51 +00:00
Ted Kremenek 37c2e96643 c-index-test shouldn't crash when a goto has no matching label. Fixes <rdar://problem/9123493>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127711 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 23:47:49 +00:00
Ted Kremenek db9e9e61f8 Remove warning for null characters in CFString literals. Clang handles them just fine, and GCC 4.2 doesn't warn here either.
We added this warning back in 2007 when we were comparing against GCC 4.0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127704 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 21:18:52 +00:00
Ted Kremenek 0c06944f5e Don't warn about null characters in Objective-C format string literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127703 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 21:18:48 +00:00
John McCall 8bba1f4ab1 Reorganize the emission of (unfoldable) constant casts a bit, and
make sure that upcasts of member pointer types are covered as constants.
Fixed rdar://problem/9130221



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 21:17:48 +00:00
Sebastian Redl 4561ecdf27 Create __has_feature(cxx_noexcept) and mark it as working.
Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented.
This completes noexcept specification work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127701 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 21:17:12 +00:00
Sebastian Redl 71fff644f9 Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127699 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 21:15:06 +00:00
Sebastian Redl 0eab51c38d Extend the noexcept expression test to test noexcept specification functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 20:45:42 +00:00
Sebastian Redl d8f2e8ed63 More robust check for the special C++0x operator new workaround.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127692 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 20:41:09 +00:00
Sebastian Redl 99439d474e Implement a hack to work around the changing exception specification of operator new in C++0x.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127688 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 19:52:30 +00:00
Ted Kremenek cf995d3577 Remove bogus assertion in IdempotentOperationsChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 19:27:57 +00:00
Sebastian Redl a968e97947 Reintroduce r127617: "Code generation for noexcept." with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127685 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 18:42:48 +00:00
Fariborz Jahanian 4eb7f69515 Don't poke into redefined 'id' type looking for a property
declaration as this results in a confusing error message,
instead of message related to missing property declaration.
// rdar://9106929


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127682 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 17:27:48 +00:00
Ted Kremenek 4ddb387130 Appease GCC. I'm surprised Clang accepted this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127672 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 05:30:12 +00:00
Ted Kremenek d0956fcaec Remove duplicate group definition that snuck in due to a merge conflict.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127671 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 05:25:02 +00:00
Ted Kremenek 908c09f64e Take 2: merge -Wuninitialized-experimental into -Wuninitialized. Only *must-be-uninitialized* warnings are reported, with *maybe-uninitialized* under a separate flag. I await any fallout/comments/feedback, although hopefully this will produce no noise for users.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127670 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 05:22:33 +00:00
Ted Kremenek 76709bf816 Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127669 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 05:22:28 +00:00
Ted Kremenek f7bafc77ba Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127666 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 04:57:38 +00:00
Ted Kremenek 496398d523 UninitializedValues: introduce ValueVector:reference class to forward to llvm::BitVector. No real functionality change, but this is a stepping stone to moving to tri-state logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 04:57:32 +00:00
Ted Kremenek afb10c4bda UninitializedValues: wrap BitVector references in a new class ValueVector. No functionality change. This defines the minimum interface that ValueVector needs to support when we no longer base it strictly on a direct interpretation of BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127664 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 04:57:29 +00:00
Ted Kremenek 136f8f24b0 Substitue term "BitVector" with "ValueVector" to prep for further revisions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127663 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 04:57:27 +00:00
Ted Kremenek 6f34213f8d Rename UninitializedValuesV2 to UninitializedValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127657 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15 03:17:07 +00:00