summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Centralize the handling ofDouglas Gregor2010-09-274-100/+116
| | | | | | | CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. llvm-svn: 114899
* Revert my patch changing the MMX "shift" intrinsics that take immediates intoBill Wendling2010-09-271-8/+8
| | | | | | | "shift with non-immediate" intrinsics. It gets here because we they aren't immediates anymore. llvm-svn: 114890
* Clean up the handling of the DeclaredDefaultConstructor andDouglas Gregor2010-09-273-14/+29
| | | | | | | | | | | | | DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. llvm-svn: 114889
* Correctly set "explicit template instantiation" kind on inner structs of ↵Nico Weber2010-09-271-4/+11
| | | | | | | | templates whose explicit instantiation is first declared and then defined. Fixes http://llvm.org/pr8207 llvm-svn: 114874
* Issue warning for trivial cases of nonnull attributesFariborz Jahanian2010-09-271-1/+6
| | | | | | | | | (on functions with no pointer arguments) but only when the attribute has not been coming from a macro instantiation in a header file. Fixes first part of radar 6857843. llvm-svn: 114860
* Copying result of object property reference expressionFariborz Jahanian2010-09-271-1/+6
| | | | | | | into a temporary is elidable as well. (Finishes up radar 8291337). llvm-svn: 114845
* Remove libclang logging codeDouglas Gregor2010-09-271-32/+2
| | | | llvm-svn: 114836
* Fixed isConstantInitializer for __builtin_choose_expr.Abramo Bagnara2010-09-271-0/+3
| | | | llvm-svn: 114820
* Fix coding standard mistake from my last commit.Michael J. Spencer2010-09-271-1/+1
| | | | | | That, and keep aKor happy :P. llvm-svn: 114816
* Lexer: Implement GCC's version of pragma message.Michael J. Spencer2010-09-271-15/+26
| | | | llvm-svn: 114814
* Driver/Linux: Translate rewritten lib options back to standard -l form whenDaniel Dunbar2010-09-251-2/+11
| | | | | | using generic GCC tools. llvm-svn: 114793
* In preparation for adding generation of destructors for objects with ↵Marcin Swiderski2010-09-251-43/+166
| | | | | | | | | | automatic storage added: - LocalScope class with iterator used to pointing into it, - fat doxygen comment for LocalScope indended usage, - BlockScopePosPair class used for storing jump targets/sources (for: goto, break, continue), that replaces raw CFGBlock pointer used earlier for this purpose. llvm-svn: 114790
* Fix a NYI in IRGen which was due to incorrect ASTFariborz Jahanian2010-09-251-2/+10
| | | | | | | for property reference expression (of c++ object type) in the conditional expression. Fixes // rdar://8291337 llvm-svn: 114783
* When setting the globally-visible declarations for a particularDouglas Gregor2010-09-242-7/+37
| | | | | | | | | | | | | identifier, we may have a Sema object but no translation unit scope (because parsing is finished). In this case, we still need to update the IdResolver, which might still be used when writing a PCH containing another PCH (without chaining). This bug manifested as a failure with precompiled preambles. Also, add a little environment-variable-sensitive logging for libclang. llvm-svn: 114774
* Allow the use of C++0x deleted functions as an extension in C++98.Anders Carlsson2010-09-243-3/+9
| | | | llvm-svn: 114762
* Teach libclang to enable multithreading in LLVM, since libclang clients are ↵Douglas Gregor2010-09-241-0/+3
| | | | | | likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients llvm-svn: 114760
* Driver: Add -fallow-unsupported which disables some of the eager error'ing we doDaniel Dunbar2010-09-241-12/+14
| | | | | | to prevent users from trying unsupported stuff. Useful for testing. llvm-svn: 114749
* Fix rewriting of property declared in @protocol's.Fariborz Jahanian2010-09-241-0/+4
| | | | | | Fixed //rdar://8472487. llvm-svn: 114741
* Patch implements passing arrays to functions expectingFariborz Jahanian2010-09-249-24/+87
| | | | | | vla. Implements pr7827. llvm-svn: 114737
* Default synthesized ivars don't really have a location in the source. Using ↵Ted Kremenek2010-09-241-3/+8
| | | | | | | | | the location of the @implementation is just confusing for clients that want to use SourceLocations for syntactic references. Fixes: <rdar://problem/8470540> llvm-svn: 114714
* Revert r114712 due to failure on darwin buildbot.Nick Lewycky2010-09-241-10/+4
| | | | llvm-svn: 114713
* Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.Nick Lewycky2010-09-231-4/+10
| | | | llvm-svn: 114712
* Fix header comment so we don't break emacs.Nick Lewycky2010-09-232-2/+2
| | | | llvm-svn: 114711
* Synchronize globally-cached code completion results with the resultsDouglas Gregor2010-09-233-80/+114
| | | | | | | | | | | | | | provided when the optimization is disabled. In particular, split the completion context CCC_Other into two contexts: CCC_Other, which means that it's an undisclosed context for which any other results are unwelcome, and CCC_Recovery, which is used in recovery cases. Since we're now using the completion context within the completion results builder, make sure that it's always set to something. Fixes <rdar://problem/8470644>. llvm-svn: 114704
* When warning about comparing an unsigned int to being >= 0, don't issue a ↵Ted Kremenek2010-09-231-1/+11
| | | | | | | | | warning if the zero value was an enum or was expanded from a macro. Fixes: <rdar://problem/8414119> llvm-svn: 114695
* For properties declared in a @protocol and redeclared in a class extension, ↵Ted Kremenek2010-09-231-2/+7
| | | | | | | | | use the class extension as the lexical DeclContext for the @property declaration that gets auto-created for the @interface. Fixes: <rdar://problem/8467189> llvm-svn: 114693
* Fix bogus compiler errors when declaring anonymous union, outside a class, withArgyrios Kyrtzidis2010-09-231-5/+4
| | | | | | | members with the same name as a decl outside the scope where the members are actually introduced. Fixes http://llvm.org/PR6741 llvm-svn: 114641
* If -fcolor-diagnostics is explicitly passed to the driver respect that even ↵Argyrios Kyrtzidis2010-09-231-2/+2
| | | | | | | | | if the driver is of the opinion that stderr can't handle them. (see http://llvm.org/PR8150) Patch by Frits van Bommel! llvm-svn: 114638
* Don't crash on _Imaginary.Argyrios Kyrtzidis2010-09-231-2/+3
| | | | llvm-svn: 114637
* Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like ↵Ted Kremenek2010-09-232-37/+20
| | | | | | VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details. llvm-svn: 114628
* IRgen/ABI/ARM: Return large vectors in memory.Daniel Dunbar2010-09-231-0/+4
| | | | llvm-svn: 114619
* IRgen/ABI/ARM: Trust the backend to pass vectors correctly for the given ABI.Daniel Dunbar2010-09-231-0/+11
| | | | | | | | | | - Therefore, we can lower out the NEON wrapper structs and pass the vectors directly. This makes a huge difference in the cleanliness of the IR after optimization. - I will trust, but verify, via future ABITest testing (for APCS-GNU, at least). llvm-svn: 114618
* Fix an inverse boolean and unnecessary new line in warning output from ↵Tom Care2010-09-221-2/+2
| | | | | | AnalyzerStatsChecker. llvm-svn: 114581
* Change source manager serialization to be less tied to the PCH model.Sebastian Redl2010-09-222-14/+15
| | | | llvm-svn: 114575
* Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a ↵Douglas Gregor2010-09-221-1/+4
| | | | | | valid result from ActOnIdExpression llvm-svn: 114548
* Implement -Wpadded and -Wpacked.Argyrios Kyrtzidis2010-09-222-22/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556) -Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect on the layout or the size of the struct. Such structs may be mis-aligned for little benefit. The warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder. To avoid calculating the layouts of all structs regardless of whether they are needed or not, I let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings will be emitted only when they are used for IR gen, and not e.g with -fsyntax-only: $ cat t.c struct S { char c; int i; }; void f(struct S* s) {} $ clang -fsyntax-only -Wpadded t.c $ clang -c -Wpadded t.c -o t.o t.c:3:7: warning: padding struct 'struct S' with 3 bytes to align 'i' [-Wpadded] int i; ^ 1 warning generated. This is a good tradeoff between providing the warnings and not calculating layouts for all structs in case the user has enabled a couple of rarely used warnings. llvm-svn: 114544
* Only preload SLocEntries after the entire PCH chain was loaded.Sebastian Redl2010-09-221-15/+22
| | | | llvm-svn: 114518
* Reshuffle PerFileData's members to make more sense.Sebastian Redl2010-09-221-6/+7
| | | | llvm-svn: 114517
* Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386Daniel Dunbar2010-09-221-4/+13
| | | | | | some projects still depend on ___eprintf being available. llvm-svn: 114509
* fix the rest of rdar://8461279 - clang miscompiles address-space qualified ↵Chris Lattner2010-09-211-8/+13
| | | | | | atomics llvm-svn: 114503
* same bug as before, this time with __sync_val_compare_and_swap.Chris Lattner2010-09-211-4/+6
| | | | llvm-svn: 114502
* fix __sync_bool_compare_and_swap to work with address-space qualified types.Chris Lattner2010-09-211-5/+6
| | | | llvm-svn: 114498
* Fixes an IRgen ICE due to cast of null pointer toFariborz Jahanian2010-09-211-2/+11
| | | | | | a vla type (fixes pr7827). llvm-svn: 114495
* Fixed pr20314-2.c failure, added E, F, p constraint letters.John Thompson2010-09-211-0/+4
| | | | llvm-svn: 114490
* Correctly register the class extension as the lexical DeclContext for ObjC ↵Ted Kremenek2010-09-211-6/+9
| | | | | | | | | | | | methods declared with @property in class extensions. This matches the behavior for setters. Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property. This fixes the remaining issues in <rdar://problem/7410145>. llvm-svn: 114477
* IRgen for gnu extension's conditional lvalue expressionFariborz Jahanian2010-09-212-5/+18
| | | | | | | with missing LHS. radar 8453812. Executable test is checked into llvm test suite. llvm-svn: 114457
* For ObjCPropertyDecls in class extensions, use the class extension as the ↵Ted Kremenek2010-09-211-12/+18
| | | | | | | | | | | lexical DeclContext for newly created ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls (if they didn't previously exist). This fixes more of the issues reported in <rdar://problem/7410145>. llvm-svn: 114456
* Add code completion for C++ constructors wherever we see the class (orDouglas Gregor2010-09-212-11/+152
| | | | | | class template) and are in a context where we can have a value. llvm-svn: 114441
* Adjust for debug info API change.Benjamin Kramer2010-09-211-1/+1
| | | | llvm-svn: 114438
* Do not warn with -Wuninitialized when the member is used in a sizeof or ↵Argyrios Kyrtzidis2010-09-211-0/+8
| | | | | | | | address-of expression. Fixes rdar://8331312. llvm-svn: 114426
OpenPOWER on IntegriCloud