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

32736 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor b31dd8ff34 Put ext_offsetof_extended_field_designator under the warning flag
-Wextended-offsetof, from Jeff Walden!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 03:01:42 +00:00
Douglas Gregor 6b18e74049 Don't crash when transforming an ill-formed pseudo-destructor
expression. Fixes PR11339.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144159 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 02:19:47 +00:00
John McCall 3382f65767 Extract the blocks-related ARC tests into their own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144158 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 02:16:13 +00:00
Douglas Gregor 6ef920976a Introduce proper spacing after the Objective-C parameter qualifiers
(bycopy, inout, etc.). Fixes <rdar://problem/10402900>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 02:13:45 +00:00
Richard Smith 3d75ca8362 Constant expression evaluation: support for default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144156 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 02:12:41 +00:00
Devang Patel 790c372f38 Remove extra ';'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144155 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 01:57:23 +00:00
Argyrios Kyrtzidis 87429a05ff [PCH] Fix reading from PCH of diagnostic pragmas.
In certain cases ASTReader would call the normal DiagnosticsEngine API to initialize
the state of diagnostic pragmas but DiagnosticsEngine would try to compare source locations
leading to crash because the main FileID was not yet initialized.

Yet another case of the ASTReader trying to use the normal APIs and inadvertently breaking
invariants. Fix this by having the ASTReader set up the internal state directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144153 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 01:24:17 +00:00
Eli Friedman 75d0fe7100 Add "I" (ICE) annotations onto a few more x86 intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144152 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 01:08:43 +00:00
Argyrios Kyrtzidis ccc9e767f2 Don't crash on invalid objc code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144150 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 00:22:48 +00:00
Argyrios Kyrtzidis 8b08eb3456 [arcmt] Take into account that all properties are strong-by-default now and fix the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144146 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 23:09:34 +00:00
John McCall a5493f8850 Bind function "r-values" as l-values when emitting them as
opaque values.  Silly C type system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144144 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:54:08 +00:00
Fariborz Jahanian 90f7b62aba objc: Don't crash on missing @interface decl.
// rdar://10415026


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144143 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:51:27 +00:00
Anna Zaks 8d4a515b03 [analyzer] Testing: test with all the non-experimental checker packages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144142 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:41:25 +00:00
Anna Zaks 86f14abc02 [analyzer] Testing: support for regenerate reference output
Change the flow of the SATestAdd so that it could be used for regenerating
the reference output without exiting with an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144141 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:41:22 +00:00
Argyrios Kyrtzidis af9b5e9f3e [arcmt] Now that readonly properties are strong-by-default, do not add redundant 'strong'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144136 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:10:58 +00:00
Douglas Gregor 3f54d48a75 Fix comment typos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144120 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:07:04 +00:00
Fariborz Jahanian f21a92d359 objc-arc: 'readonly' property of retainable object
type is strong by default too. // rdar://10410903


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144118 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 20:58:53 +00:00
Ted Kremenek 4c11772bb9 Sort contents of exports file. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144116 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 20:42:13 +00:00
Ted Kremenek 0b69aa8563 serialized diagnostics: serialize the version info in a separate meta block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144115 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 20:27:29 +00:00
Anna Zaks 8d0ffc7f8c [analyzer] Remove redundant check from DivZeroChecker
Analysis by Ted:
"
    if (stateZero && !stateNotZero) {

is checking to see if:

  (A)  "it is possible for the value to be zero"   (stateZero)

    AND

  (B) "it is not possible for the value to be non-zero"  (!stateNotZero)

That said, the only way for both B to be true AND A to be false is if the path is completely infeasible by the time we reach the divide-by-zero check.  For the most part (all cases?), such cases should automatically get pruned out at branches (i.e., an infeasible path gets dropped), which is the case in our tests.  So the question is whether or not such an infeasible path might not get dropped earlier?  I can't envision any right now.

Indeed, the rest of the checker assumes that if the bug condition didn't fire then 'stateNotZero' is non-NULL:

    C.addTransition(stateNotZero);
"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144114 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:56:35 +00:00
Anna Zaks a7a2564ff5 [analyzer] Testing: Display the number of reported differences in the main log.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144113 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:56:31 +00:00
Eli Friedman 4219c6652b This test isn't portable to non-x86 platforms; specify a triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144112 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:55:32 +00:00
Douglas Gregor 5b0c5199a7 Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes PR11320.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144110 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:45:38 +00:00
Eli Friedman 5bea4f6860 Misc fixes for clang driver on Mips Linux. Patch by Simon Atanasyan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144108 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:43:37 +00:00
Axel Naumann d9d137e6bc From Vassil Vassilev: add checks for removing Decls for more use cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144094 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 18:21:06 +00:00
Chandler Carruth c44bc2d32f Add a default system include of '/include'. This isn't particularly
useful when using Clang as a system-compiler, but its harmless. When
using Clang as a cross-compiler, this can be very handy as quite a few
toolchains ship their libc headers here rather than under
'/usr/include'.

For reference, this is the beginning of my work to also make the Clang
driver more suitable as a cross-compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144089 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 17:19:47 +00:00
Argyrios Kyrtzidis ae7c25dab5 [arcmt] Now that properties are strong by default, avoid adding redundant '(strong)'
property attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144078 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 05:56:11 +00:00
Argyrios Kyrtzidis 263d667183 [arcmt] NSViewController does not support weak.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144077 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 05:56:08 +00:00
Bob Wilson 6f9f03ef37 Check pointer types for arguments of Neon load/store macros. rdar://9958031
The Neon load/store intrinsics need to be implemented as macros to avoid
hiding alignment attributes on the pointer arguments, and the macros can
only evaluate those pointer arguments once (in case they have side effects),
so it has been hard to get the right type checking for those pointers.
I tried various alternatives in the arm_neon.h header, but it's much more
straightforward to just check directly in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144075 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 05:04:11 +00:00
Eli Friedman 355130fde9 Misc fixes to pcmp*stri.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144073 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 04:13:51 +00:00
John McCall 9da235244c Fix the layout of vb-tables and vf-tables in the MS C++ ABI.
Based on work by Dmitry Sokolov!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144072 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 04:01:03 +00:00
NAKAMURA Takumi 83084c8635 lib/CodeGen/CGBuiltin.cpp: Tweak the identifier "Type" to appease msvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144065 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 03:27:04 +00:00
Peter Collingbourne 63cf68a4fc TypePrinter: print OpenCL address space names. Patch by Richard
Membarth, test case by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 02:52:58 +00:00
Peter Collingbourne 13330c4e85 DeclPrinter: print the declaration's storage class specifier as
written, instead of the resolved storage class, which might not be
legal to specify on the declaration (such as out-of-line definitions
of static class members in C++, and __local variables in OpenCL).
Initial patch by Richard Membarth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144062 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 02:52:52 +00:00
Richard Smith aa9aa3bfcd Some tests missed from r144056.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144060 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 02:18:13 +00:00
Argyrios Kyrtzidis 7cfd7fe020 [arcmt] When we already removed a __weak, don't try to change it to __unsafe_unretained
later on, or we will end up with a redundant '__unsafe_unretained'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144059 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 02:02:38 +00:00
Matt Beaumont-Gay 1aa1721f14 Revert r143972, which didn't actually compile under -Wnon-virtual-dtor.
(TIL: -Wnon-virtual-dtor is not in -Wall.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144058 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:53:17 +00:00
Richard Smith db1822c6de Fix a cluster of related issues involving value-dependence and constant
expression evaluation:
 - When folding a non-value-dependent expression, we may try to use the
   initializer of a value-dependent variable. If that happens, give up.
 - In C++98, actually check that a const, non-volatile DeclRefExpr inside an ICE
   is of integral or enumeration type (a reference isn't OK!)
 - In C++11, DeclRefExprs for objects of const literal type initialized with
   value-dependent expressions are themselves value-dependent.
 - So are references initialized with value-dependent expressions (though this
   case is missing from the C++11 standard, along with many others).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144056 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:31:09 +00:00
Bob Wilson da95f73b59 Clean up type flags for overloaded Neon builtins. No functional change.
This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now.  Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:16:11 +00:00
Anna Zaks bc05f57cba [analyzer] Testing infrastructure: flush the output between projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144051 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 00:27:56 +00:00
John McCall dc4df51d32 There are some crazy cases that LookupMethodInReceiverType
doesn't duplicate, but they all surface as implicit
properties.  It's also a useful optimization to not
duplicate the implicit getter lookup.  So, trust the
getter lookup that was already done in these cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144031 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 22:49:50 +00:00
Anna Zaks 1a8a8cbea6 [analyzer] Make sure scan-build catches all clang failures.
scan-build ignores clang failures in some cases, which might lead to
silent failure suppression. For example, if clang command line
argument is wrong. (Addresses radar://10406598)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144029 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 22:38:10 +00:00
Richard Smith 66f85713bd constexpr: static data members declared constexpr are required to have an
initializer; all other constexpr variables are merely required to be
initialized. In particular, a user-provided constexpr default constructor can be
used for such initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144028 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 22:16:17 +00:00
Douglas Gregor 45fa560c72 When we notice that a member function is defined with "= delete" or "=
default", make a note of which is used when creating the
initial declaration. Previously, we would wait until later to handle
default/delete as a definition, but this is too late: when adding the
declaration, we already treated the declaration as "user-provided"
when in fact it was merely "user-declared".

Fixes PR10861 and PR10442, along with a bunch of FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 20:56:01 +00:00
Chad Rosier cf6ba2eeae Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144002 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 19:52:29 +00:00
Chad Rosier 55ccbd5fbf Tablegenify -g options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 19:51:54 +00:00
Richard Trieu 8da270e644 Remove test with int128 printing since it breaks on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143997 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 19:30:35 +00:00
Douglas Gregor 21adcf3b5f Add missing part of test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 18:54:12 +00:00
Douglas Gregor 66e870029f ASTConsumer::handleTopLevelDecl will end up getting called for
function template instantiations. Fixes <rdar://problem/10398005> / PR11312.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143984 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 18:53:57 +00:00
Argyrios Kyrtzidis a33849b368 [arcmt] Fix handling NSMakeCollectable inside an objc method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143980 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 18:46:50 +00:00