summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-253-12/+2
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 llvm-svn: 151427
* Implement a new type trait __is_trivially_constructible(T, Args...)Douglas Gregor2012-02-242-0/+7
| | | | | | | | | | | | | | | | that provides the behavior of the C++11 library trait std::is_trivially_constructible<T, Args...>, which can't be implemented purely as a library. Since __is_trivially_constructible can have zero or more arguments, I needed to add Yet Another Type Trait Expression Class, this one handling arbitrary arguments. The next step will be to migrate UnaryTypeTrait and BinaryTypeTrait over to this new, more general TypeTrait class. Fixes the Clang side of <rdar://problem/10895483> / PR12038. llvm-svn: 151352
* Update set-xcode-analyzer to work with Xcode repackaging in Xcode 4.3Ted Kremenek2012-02-221-1/+9
| | | | llvm-svn: 151179
* [libclang] Index the field references of a designated initializer, ↵Argyrios Kyrtzidis2012-02-221-0/+11
| | | | | | rdar://10906206 llvm-svn: 151118
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-208-17/+17
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Revert "Revert "Make CXXNewExpr contain only a single initialier, and not ↵Sebastian Redl2012-02-161-3/+2
| | | | | | | | hold the used constructor itself."" This reintroduces commit r150682 with a fix for the Bullet benchmark crash. llvm-svn: 150685
* Revert "Make CXXNewExpr contain only a single initialier, and not hold the ↵Sebastian Redl2012-02-161-2/+3
| | | | | | | | | | used constructor itself." It leads to a compiler crash in the Bullet benchmark. This reverts commit r12014. llvm-svn: 150684
* Make CXXNewExpr contain only a single initialier, and not hold the used ↵Sebastian Redl2012-02-161-3/+2
| | | | | | | | | | constructor itself. Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities. This breaks the static analysis of new expressions. I've filed PR12014 to track this. llvm-svn: 150682
* [libclang] Do index statements inside a type source info. rdar://10872758Argyrios Kyrtzidis2012-02-161-0/+5
| | | | llvm-svn: 150647
* Provide common include for all diagnostic headers.David Blaikie2012-02-151-19/+1
| | | | | | Reviewed by Ted Kremenek. llvm-svn: 150616
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-7/+45
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Fix typo in r150549.Richard Smith2012-02-151-3/+3
| | | | llvm-svn: 150555
* Implement indexing support for lambdas in libclang (both kinds), asDouglas Gregor2012-02-157-7/+122
| | | | | | | well as improving the RecursiveASTVisitor's walk of lambda expressions. llvm-svn: 150549
* [libclang] Indexing: only index implicit template instantiations via an ↵Argyrios Kyrtzidis2012-02-146-21/+44
| | | | | | opt-in indexing option. llvm-svn: 150517
* Fix use-after-free introduced by me being an idiot.Ted Kremenek2012-02-141-6/+4
| | | | llvm-svn: 150461
* Implement new DiagnosticsRenderer that packages notes retrieved by ↵Ted Kremenek2012-02-143-10/+126
| | | | | | | | | clang_getDiagnosticSetFromTU() as child diagnostics of primary diagnostics. By using the DiagnosticRenderer, these Diagnostics now match with those generated for serialized diagnostics. llvm-svn: 150456
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-137-17/+17
| | | | | | More cleanup after r149799. llvm-svn: 150380
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-139-21/+21
| | | | | | More cleanup after r149798. llvm-svn: 150379
* [libclang] For a reference of an implicit template instantiation just giveArgyrios Kyrtzidis2012-02-111-3/+0
| | | | | | | a reference for the instantiation decl. Also test that its location is correct after previous commit. llvm-svn: 150291
* Have the driver pass CPU and target feature information to cc1as.Jim Grosbach2012-02-101-4/+25
| | | | | | | | | | When creating the MCSubtargetInfo, the assembler driver uses the CPU and feature string to construct a more accurate model of what instructions are and are not legal. rdar://10840476 llvm-svn: 150273
* [libclang] Indexing API: fully index using decls and directives.Argyrios Kyrtzidis2012-02-101-0/+23
| | | | llvm-svn: 150268
* [libclang] Indexing API: Fully index implict template instantiations.Argyrios Kyrtzidis2012-02-105-4/+54
| | | | llvm-svn: 150267
* [libclang] Encode the template specialization parameters of a functionArgyrios Kyrtzidis2012-02-101-0/+10
| | | | | | specialization in its USR string. llvm-svn: 150264
* cmake: create a relative symlink to clang, not absoluteDylan Noblesmith2012-02-091-3/+4
| | | | | | | Hardcoding the location of the build directory seems like it would break at `make install`/packaging time. llvm-svn: 150201
* [libclang] Indexing: When suppressing references, suppress referencesArgyrios Kyrtzidis2012-02-081-0/+13
| | | | | | of bases in C++ classes. rdar://10768707 llvm-svn: 150048
* [libclang] For CXXOperatorCallExprs, give a valid source location to the ↵Argyrios Kyrtzidis2012-02-081-0/+6
| | | | | | | | | | DeclRefExpr that is referencing the member function, so we can index the referenced function. Fixes rdar://10762375&10324915 & http://llvm.org/PR11192 llvm-svn: 150033
* [libclang] Do not index implicit C++ member functions. rdar://10769813Argyrios Kyrtzidis2012-02-073-2/+5
| | | | llvm-svn: 150007
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-071-2/+0
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-072-2/+2
| | | | llvm-svn: 150000
* Print NamedDecls directly to a raw_ostream where possible.Benjamin Kramer2012-02-071-3/+3
| | | | llvm-svn: 149982
* Introduce basic ASTs for lambda expressions. This covers:Douglas Gregor2012-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Capturing variables by-reference and by-copy within a lambda - The representation of lambda captures - The creation of the non-static data members in the lambda class that store the captured variables - The initialization of the non-static data members from the captured variables - Pretty-printing lambda expressions There are a number of FIXMEs, both explicit and implied, including: - Creating a field for a capture of 'this' - Improved diagnostics for initialization failures when capturing variables by copy - Dealing with temporaries created during said initialization - Template instantiation - AST (de-)serialization - Binding and returning the lambda expression; turning it into a proper temporary - Lots and lots of semantic constraints - Parameter pack captures llvm-svn: 149977
* Added location for template keyword in TemplateSpecializationTypeLoc. In the ↵Abramo Bagnara2012-02-061-1/+1
| | | | | | process removed some naming ambiguities. llvm-svn: 149870
* Move various diagnostic operator<< overloads out of line and remove includes ↵Benjamin Kramer2012-02-041-0/+2
| | | | | | | | | of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. llvm-svn: 149781
* [libclang] Stick to the silly notion that a forward class/protocolArgyrios Kyrtzidis2012-02-041-0/+14
| | | | | | declaration is a reference. rdar://10749990 llvm-svn: 149733
* Pass the SourceMgr to the MCContext for cc1as.Jim Grosbach2012-02-021-1/+1
| | | | llvm-svn: 149608
* Added source location for the template keyword in AST template-id expressions.Abramo Bagnara2012-01-271-1/+1
| | | | llvm-svn: 149127
* Teach ccc-analyzer about -fobjc-abi-version.Ted Kremenek2012-01-261-1/+2
| | | | llvm-svn: 149094
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-261-1/+2
| | | | | | | | leaves "finalize' behind and in arc mode, does not include it. This allows the migrated source to be compiled in both gc and arc mode. // rdar://10532441 llvm-svn: 149079
* [driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() ↵Argyrios Kyrtzidis2012-01-251-2/+2
| | | | | | fails. llvm-svn: 148970
* [analyzer] Add the HTML file to the SATest diagnostic diff.Anna Zaks2012-01-241-1/+5
| | | | | | (Uses the functionality which has been in CmpRuns long before.) llvm-svn: 148868
* [libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"Argyrios Kyrtzidis2012-01-241-6/+2
| | | | | | | | for forward references of classes and protocols, this breaks libclang API usage. rdar://10747438. llvm-svn: 148861
* [libclang] When calling clang_getCursorReferenced on a class or protocolArgyrios Kyrtzidis2012-01-241-3/+11
| | | | | | | | | forward reference, do give an interface or protocol cursor back, don't give an 'UnexposedDecl' one. rdar://10743193 llvm-svn: 148848
* [libclang] For:Argyrios Kyrtzidis2012-01-231-0/+3
| | | | | | | | | @implementation I(cat) suppress subsequent references to 'I'. rdar://10568103 llvm-svn: 148730
* Introduce CXXRecordDecl::isCLike() that is true if the class is C-like,Argyrios Kyrtzidis2012-01-231-5/+2
| | | | | | | | | without C++-specific features. Use it to set the language to C++ when indexing non-C-like structs. rdar://10732579 llvm-svn: 148708
* [libclang] Index C++ template specializations, rdar://10732708Argyrios Kyrtzidis2012-01-231-0/+8
| | | | llvm-svn: 148707
* [libclang] Index namespaces in C++ qualified lookup of members, rdar://10732798Argyrios Kyrtzidis2012-01-231-0/+5
| | | | llvm-svn: 148706
* [libclang] Index C++ constructor initializers, rdar://10732164Argyrios Kyrtzidis2012-01-231-0/+16
| | | | llvm-svn: 148705
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-2/+2
| | | | llvm-svn: 148582
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+1
| | | | llvm-svn: 148577
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-202-3/+2
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
OpenPOWER on IntegriCloud