summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed some corner cases due to implicit int TypeLoc and simplified the logic.Abramo Bagnara2012-10-181-11/+22
| | | | llvm-svn: 166174
* Put used="1" on all used declarations in the XML dumper. This allows us toNick Lewycky2012-10-181-1/+3
| | | | | | start seeing the bit so that we can find bugs and write tests for it. llvm-svn: 166171
* Start factoring the on-disk records for an AST file into a controlDouglas Gregor2012-10-185-238/+323
| | | | | | | | | | | | | | | | | block, which stores information about how the AST file to generated, from the AST block, which stores the actual serialized AST. The information in the control block should be enough to determine whether the AST file is up-to-date and compatible with the current translation unit, and reading it should not cause any side effects that aren't easy to undo. That way, we can back out from an attempt to read an incompatible or out-of-date AST file. Note that there is still more factoring to do. In particular, information about the source files used to generate the AST file (along with their time stamps, sizes, etc.) still resides in the source manager block. llvm-svn: 166166
* Revert svn r165741 "Add TargetTransformInfo to the clang driver."Bob Wilson2012-10-181-5/+1
| | | | | | | Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang, so I'm reverting it for now, along with follow-on patches like this one. llvm-svn: 166164
* libclang/CXComment.cpp: Fix abuse of StringRef.NAKAMURA Takumi2012-10-181-1/+1
| | | | llvm-svn: 166163
* Tests for DR1507.Richard Smith2012-10-182-1/+16
| | | | llvm-svn: 166162
* [libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis2012-10-186-20/+24
| | | | | | imports. llvm-svn: 166161
* [libclang] Add a test for annotation of module headersArgyrios Kyrtzidis2012-10-181-0/+42
| | | | llvm-svn: 166160
* Update comment to match DR1502.Richard Smith2012-10-171-2/+1
| | | | llvm-svn: 166158
* DR1535: only potentially-evaluated typeid expressions are disallowed in constantRichard Smith2012-10-173-15/+22
| | | | | | expressions, not *any* typeid on a polymorphic class type. llvm-svn: 166156
* Fix -Woverloaded-virtual when the using statement refers to a base ↵David Blaikie2012-10-172-1/+22
| | | | | | | | | | | | | | | declaration of a virtual function. GCC and Clang both do not warn on: struct a { virtual void func(); }; struct b: a { virtual void func(); void func(int); }; struct c: b { void func(int); using b::func; }; but if the "using" was using a::func GCC would still remain silent where Clang would warn. This change makes Clang consistent with GCC's existing behavior. llvm-svn: 166154
* DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.Richard Smith2012-10-174-21/+20
| | | | llvm-svn: 166152
* XFAIL these tests until I can figure out what is going on onFariborz Jahanian2012-10-173-0/+3
| | | | | | other platforms. llvm-svn: 166151
* Adds couple of missing warning flags so warnings can be turnedFariborz Jahanian2012-10-174-5/+13
| | | | | | off. // rdar://12501960 llvm-svn: 166150
* Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith2012-10-176-4/+28
| | | | llvm-svn: 166139
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-1710-57/+116
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* [analyzer] CmpRuns: cleanup APIs, allow processing of plists with noAnna Zaks2012-10-171-16/+20
| | | | | | clang_version, fix the compare routine. llvm-svn: 166129
* [analyzer] When binding to a ParenExpr, bind to its inner expression instead.Jordan Rose2012-10-173-92/+125
| | | | | | | | | | | | | This actually looks through several kinds of expression, such as OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup should be consistent, and so if the environment needs to be modified later, the code doing the modification will not have to manually look through these "transparent" expressions to find the real binding to change. This is necessary for proper updating of struct rvalues as described in the previous commit. llvm-svn: 166121
* [analyzer] Create a temporary region when accessing a struct rvalue.Jordan Rose2012-10-175-40/+136
| | | | | | | | | | | | | | | | | | | | | | In C++, rvalues that need to have their address taken (for example, to be passed to a function by const reference) will be wrapped in a MaterializeTemporaryExpr, which lets CodeGen know to create a temporary region to store this value. However, MaterializeTemporaryExprs are /not/ created when a method is called on an rvalue struct, even though the 'this' pointer needs a valid value. CodeGen works around this by creating a temporary region anyway; now, so does the analyzer. The analyzer also does this when accessing a field of a struct rvalue. This is a little unfortunate, since the rest of the struct will soon be thrown away, but it does make things consistent with the rest of the analyzer. This allows us to bring back the assumption that all known 'this' values are Locs. This is a revised version of r164828-9, reverted in r164876-7. <rdar://problem/12137950> llvm-svn: 166120
* Move -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.David Blaikie2012-10-171-1/+2
| | | | | | Addressing feedback on r166039 given by Matt Beaumont-Gay. llvm-svn: 166118
* Revert r158009 since there are some uses of artificial functions inEric Christopher2012-10-175-30/+14
| | | | | | debug info. llvm-svn: 166109
* Fix tests, which accidentally matched implicit code on specificDaniel Jasper2012-10-171-26/+44
| | | | | | platforms to make buildbots happy. llvm-svn: 166100
* Remove an unneeded flag from the bitrig driver tests.Chandler Carruth2012-10-171-3/+3
| | | | | | Based loosely on a patch from David Hill. llvm-svn: 166096
* First version of matchers for Types and TypeLocs.Daniel Jasper2012-10-177-50/+727
| | | | | Review: http://llvm-reviews.chandlerc.com/D47 llvm-svn: 166094
* Update test FIXME: The '[]' in 'delete []' is never part of a lambda.Richard Smith2012-10-171-2/+7
| | | | llvm-svn: 166090
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-176-12/+52
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* Organize and rename the magic constants for class flags.John McCall2012-10-171-48/+54
| | | | | | No functionality change. llvm-svn: 166087
* At -O0, prefer objc_storeStrong with a null new value to theJohn McCall2012-10-1714-63/+175
| | | | | | | | | | | combination of a load+objc_release; this is generally better for tools that try to track why values are retained and released. Also use objc_storeStrong when copying a block (again, only at -O0), which requires us to do a preliminary store of null in order to compensate for objc_storeStrong's assign semantics. llvm-svn: 166085
* Implement C++ 10.3p16 - overrides involving deleted functions must match.David Blaikie2012-10-173-11/+60
| | | | | | | Only deleted functions may override deleted functions and non-deleted functions may only override non-deleted functions. llvm-svn: 166082
* "'Might as well make it static const.' -- John McCall" -- Michael ScottNico Weber2012-10-171-1/+1
| | | | llvm-svn: 166080
* Fix the handling of target options in our unit tests.Douglas Gregor2012-10-173-12/+17
| | | | llvm-svn: 166079
* Move test to a more appropriate place.Eli Friedman2012-10-161-0/+0
| | | | llvm-svn: 166078
* Fix pretty-printing for variables declared in a condition. Patch by ↵Eli Friedman2012-10-162-6/+26
| | | | | | Grzegorz Jablonski. llvm-svn: 166073
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-1613-83/+156
| | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
* DR1492: In a definition of a destructor, the exception specification must beRichard Smith2012-10-163-17/+46
| | | | | | explicitly specified iff it was specified in the declaration. llvm-svn: 166071
* PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.David Blaikie2012-10-165-2/+31
| | | | | | | | This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't present in 4.4 - not sure when it got added, but you'll need something with that function available for this to work). llvm-svn: 166069
* ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]Manman Ren2012-10-161-92/+91
| | | | | | rdar://12439123 llvm-svn: 166066
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-1616-21/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. llvm-svn: 166065
* XFAIL this testing case to recover buildbotManman Ren2012-10-161-0/+1
| | | | llvm-svn: 166064
* [ms-inline asm] Move some logic around to simplify the interface between theChad Rosier2012-10-163-38/+46
| | | | | | front-end and the AsmParser. No functional change intended. llvm-svn: 166063
* Test pure virtual vtable entries in the Itanium ABI.David Blaikie2012-10-161-0/+11
| | | | | | (original functionality committed in r99807, refactored in r160373) llvm-svn: 166059
* Note deleted functions when dumping vtables.David Blaikie2012-10-162-0/+24
| | | | llvm-svn: 166056
* ARM ABI: fix ABI alignment issues in varargs.Manman Ren2012-10-162-9/+41
| | | | | | | | We generalize r166040 to handle ABI alignment issues for all types. rdar://12439123 llvm-svn: 166052
* [analyzer] Expose clang_version in CmpRunsAnna Zaks2012-10-161-2/+3
| | | | llvm-svn: 166048
* [analyzer] Ivar Invalidation: track ivars in continuations andAnna Zaks2012-10-162-6/+15
| | | | | | @implementation. llvm-svn: 166047
* ARM ABI: passing illegal vector types as varargs.Manman Ren2012-10-162-2/+238
| | | | | | | | | | | | | | We expand varargs in clang and the call site is handled in the back end, it is hard to match exactly how illegal vectors are handled in the backend. Therefore, we legalize the illegal vector types in clang: if (Size <= 32), legalize to i32. if (Size == 64), legalize to v2i32. if (Size == 128), legalize to v4i32. if (Size > 128), use indirect. rdar://12439123 llvm-svn: 166043
* ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.Manman Ren2012-10-162-6/+76
| | | | | | | | | | We create an aligned temporary space and copy the content over from ap.cur to the temporary space. This is necessary if the natural alignment of the type is greater than the ABI alignment. rdar://12439123 llvm-svn: 166040
* Implement GCC's -Wint-to-pointer-cast.David Blaikie2012-10-1613-14/+72
| | | | | | | | | | | | This implementation doesn't warn on anything that GCC doesn't warn on with the exception of templates specializations (GCC doesn't warn, Clang does). The specific skipped cases (boolean, constant expressions, enums) are open for debate/adjustment if anyone wants to demonstrate that GCC is being overly conservative here. The only really obvious false positive I found was in the Clang regression suite's MPI test - apparently MPI uses specific flag values in pointer constants. (eg: #define FOO (void*)~0) llvm-svn: 166039
* When using a symbol with attribute weakref, search for it first andJoerg Sonnenberger2012-10-162-5/+14
| | | | | | | | don't try the normal GetOrCreateLLVM. The latter could drop the weak atrtibute on the second reference, if there is no explicit declaration of the aliasee. llvm-svn: 166032
* Minor tweak to last patch along with a test case.Fariborz Jahanian2012-10-162-1/+13
| | | | | | // rdar://12491143 llvm-svn: 166030
OpenPOWER on IntegriCloud