summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add objective-C style formatting to clang format andFariborz Jahanian2012-12-201-6/+52
| | | | | | | use it to format xml declaration tags. // rdar://12378714 llvm-svn: 170727
* Update RetainCountChecker to understand attribute ns_returns_autoreleased.Ted Kremenek2012-12-201-4/+6
| | | | | | Fixes <rdar://problem/12887356>. llvm-svn: 170724
* Rename llvm::Attributes to llvm::Attribute.Bill Wendling2012-12-2012-85/+85
| | | | llvm-svn: 170722
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-2028-270/+270
| | | | | | which is wrong here. llvm-svn: 170721
* Fix Generic_GCC::GCCVersion::operator<Rafael Espindola2012-12-201-1/+2
| | | | | | | | | Without this patch comparing two equal versions without patch numbers (4.7 for example) will result in A < B and B < A. Patch by Simon Atanasyan. llvm-svn: 170705
* Minor coding style issue: NULL -> 0Alexander Kornienko2012-12-201-1/+1
| | | | llvm-svn: 170688
* Add __has_feature(memory_sanitizer).Evgeniy Stepanov2012-12-201-0/+1
| | | | llvm-svn: 170686
* ASTDumper coding style fixes.Alexander Kornienko2012-12-201-17/+16
| | | | | | | | http://llvm-reviews.chandlerc.com/D226 Patch by Philip Craig! llvm-svn: 170684
* Fix another uninitialized bool member bug found by -fsanitize=bool. This oneRichard Smith2012-12-201-0/+1
| | | | | | | appears to currently be benign (we happen to test the flags in the right order, so we never depend on the uninitialized value). llvm-svn: 170640
* Robustify the @encode code and add support for _Atomic.John McCall2012-12-201-52/+109
| | | | | | Fixes PR14628. llvm-svn: 170639
* Fix code that attempted to produce a diagnostic with one DiagnosticEngine, thenRichard Smith2012-12-203-10/+27
| | | | | | | | produce a note for that diagnostic either with a different DiagnosticEngine or after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the wrong thing if the original diagnostic was suppressed. llvm-svn: 170636
* Implement AST dumper for Decls.Alexander Kornienko2012-12-204-167/+780
| | | | | | | | http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! llvm-svn: 170634
* [analyzer] Add the pointer escaped callback.Anna Zaks2012-12-2010-116/+204
| | | | | | | | | | Instead of using several callbacks to identify the pointer escape event, checkers now can register for the checkPointerEscape. Converted the Malloc checker to use the new callback. SimpleStreamChecker will be converted next. llvm-svn: 170625
* [preprocessor] When "merging" macro argument tokens into one SLocEntry chunk,Argyrios Kyrtzidis2012-12-191-2/+6
| | | | | | | | make sure they came from the same kind of FileIDs. Thanks to Abramo Bagnara for providing the test case. llvm-svn: 170616
* [driver] Have -isysroot warn on nonexistent paths.Chad Rosier2012-12-191-1/+6
| | | | | | rdar://12282267 llvm-svn: 170611
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-10/+25
| | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. llvm-svn: 170606
* [PCH/Modules] In ASTReader::completeVisibleDeclsMap, make sure to visit allArgyrios Kyrtzidis2012-12-191-4/+7
| | | | | | | | | | modules when getting the decls for a namespace or translation unit. Otherwise the code-completion results will not be complete. rdar://12889089 llvm-svn: 170596
* objective-C: Don't warn of unimplemented property of protocols in Fariborz Jahanian2012-12-191-4/+15
| | | | | | | category, when those properties will be implemented in category's primary class or one of its super classes. // rdar://12568064 llvm-svn: 170573
* Fix PR14591: Windows newlines in doxygen comments cause failed assertion inDmitri Gribenko2012-12-191-2/+1
| | | | | | | | TextDiagnostic Patch by Janusz Chorko. llvm-svn: 170566
* Comment parsing: add a missing 'else'. Found by inspection.Dmitri Gribenko2012-12-191-1/+1
| | | | | | | No testcase because we were just building an extra AST node and eventually throwing it away, so it did not affect correctness. llvm-svn: 170563
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-1928-270/+270
| | | | | | single attribute in the future. llvm-svn: 170500
* Fix assertion failure in self-host (and probably bogus template instantiationRichard Smith2012-12-191-4/+0
| | | | | | | | too). When instantiating a direct-initializer, if we find it has zero arguments, produce an empty ParenListExpr rather than returning a null expression. llvm-svn: 170490
* PR13470: Ensure that copy-list-initialization isntantiates asRichard Smith2012-12-1910-104/+124
| | | | | | | | | | | | copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. llvm-svn: 170489
* Pass AnalyzerOptions to PathDiagnosticConsumer to make analyzer options ↵Ted Kremenek2012-12-194-14/+28
| | | | | | | | accessible there. This is plumbing needed for later functionality changes. llvm-svn: 170488
* Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.Ted Kremenek2012-12-191-4/+2
| | | | llvm-svn: 170487
* Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as ↵David Blaikie2012-12-1921-148/+152
| | | | | | | | | | | | | | | per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
* Make sure CodeGen uses a value of the correct type as the result ofEli Friedman2012-12-191-1/+1
| | | | | | of assignment to a bool bitfield. PR14638. llvm-svn: 170480
* Fix a crash in diagnostic printing when a template class type is diff'edEli Friedman2012-12-181-1/+6
| | | | | | against itself. PR14489. llvm-svn: 170474
* Enable the loop vectorizer in clang via -fvectorizeNadav Rotem2012-12-181-2/+2
| | | | llvm-svn: 170472
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-181-1/+3
| | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
* Be defensive when printing module import locations; the diagnostic printer ↵Douglas Gregor2012-12-181-1/+1
| | | | | | needs to be robust llvm-svn: 170466
* Similar to 170440 - fix build warning with gccEli Bendersky2012-12-181-1/+1
| | | | llvm-svn: 170461
* Better support for constructor initializers.Daniel Jasper2012-12-181-49/+44
| | | | | | | | | | | | | | | | | | | | We used to format initializers like this (with a sort of hacky implementation): Constructor() : Val1(A), Val2(B) { and now format like this (with a somewhat better solution): Constructor() : Val1(A), Val2(B) { assuming this would not fit on a single line. Also added tests. As a side effect we now first analyze whether an UnwrappedLine needs to be split at all. If not, not splitting it is the best solution by definition. As this should be a very common case in normal code, not exploring the entire solution space can provide significant speedup. llvm-svn: 170457
* CodeGen: Expand creal and cimag into complex field loadsMeador Inge2012-12-181-2/+8
| | | | | | | | | | | | | | | PR 14529 was opened because neither Clang or LLVM was expanding calls to creal* or cimag* into instructions that just load the respective complex field. After some discussion, it was not considered realistic to do this in LLVM because of the platform specific way complex types are expanded. Thus a way to solve this in Clang was pursued. GCC does a similar expansion. This patch adds the feature to Clang by making the creal* and cimag* functions library builtins and modifying the builtin code generator to look for the new builtin types. llvm-svn: 170455
* Fix a compilation warning with gcc 4.6Eli Bendersky2012-12-181-1/+1
| | | | llvm-svn: 170440
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-1820-2/+256
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-1820-19180/+18926
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-1820-18926/+19180
| | | | llvm-svn: 170428
* Remove obsolete FIXMEs.David Chisnall2012-12-181-2/+0
| | | | llvm-svn: 170425
* Inline hasAtomicCopyHelperAPI.Rafael Espindola2012-12-181-6/+2
| | | | llvm-svn: 170408
* Merge storage classes even when contexts don't match.Rafael Espindola2012-12-182-4/+7
| | | | | | | | This fixes the storage class of extern decls that are merged with file level statics. The patch also fixes the linkage computation so that they are considered internal. llvm-svn: 170406
* Fix typo (thanks to Jordan for spotting it!).Richard Smith2012-12-181-1/+1
| | | | llvm-svn: 170403
* The underlying type for an enum should be an integer type, not another enum.Eli Friedman2012-12-181-1/+5
| | | | | | | | (This change only affects ObjC.) <rdar://problem/12857117>. llvm-svn: 170402
* When warning about a missing prototype because a function declaration is ↵Anders Carlsson2012-12-181-2/+19
| | | | | | missing 'void', insert a fixit to add the void. llvm-svn: 170399
* More conservative fix for <rdar://problem/12847524> (a crash printing ↵Eli Friedman2012-12-181-0/+7
| | | | | | | | diagnostic ranges). I'm not really happy with this fix, but I'm confident it's correct. llvm-svn: 170397
* Add support for passing the main file name down to the assemblerEric Christopher2012-12-182-14/+21
| | | | | | | | for location information. Part of PR14624 llvm-svn: 170391
* Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a referenceRichard Smith2012-12-181-1/+8
| | | | | | to an object outside its lifetime does not have undefined behavior. llvm-svn: 170387
* Fix isThisDeclarationADefinition for extern following tentative.Rafael Espindola2012-12-171-1/+1
| | | | | | | | An extern declaration following a tentative definition should not itself be considered a tentative definition. Fixes pr14614. llvm-svn: 170377
* Fix PR14625 by teaching the driver to detect PWD for assembly files.Chandler Carruth2012-12-171-10/+21
| | | | | | | | | | | | | | This also requires adding support to -cc1as for passing the detecting PWD down through LLVM's debug info (which in turn required the LLVM change in r170371). The test case is weak (we only test the driver behavior) because there is currently to infrastructure for running cc1as in the test suite. So those four lines are untested (much like all other lines in that file), but we have a test for the same pattern using llvm-mc in the LLVM repository. llvm-svn: 170373
* Don't include the header outside the include guards, it defeats the purpose ↵Argyrios Kyrtzidis2012-12-171-2/+2
| | | | | | of the include guards. llvm-svn: 170364
OpenPOWER on IntegriCloud