summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Hold the LLVMContext by reference instead of by pointer.Owen Anderson2009-07-015-8/+8
| | | | llvm-svn: 74642
* Updated CXXConstructorDecl AST node for ctor-initilaizer list.Fariborz Jahanian2009-07-012-6/+57
| | | | | | No change in functionality. llvm-svn: 74639
* Fix thinko in r74506, test condition for floats was inverted.Daniel Dunbar2009-07-011-7/+7
| | | | | | - Refactored slightly to make control flow more obvious. llvm-svn: 74637
* Driver: Mark some Compilation members const.Daniel Dunbar2009-07-012-5/+6
| | | | llvm-svn: 74636
* Driver: Move Compilation::Execute to Driver::ExecuteCompilation.Daniel Dunbar2009-07-015-55/+63
| | | | | | | | | - The Compilation is just a helper class, it shouldn't have that amount of logic in it. - No functionality change. llvm-svn: 74634
* Patch to implement template types in ctor-initializer list.Fariborz Jahanian2009-07-015-8/+56
| | | | | | Also has fix for bugzilla-4469. llvm-svn: 74631
* Driver: Improve diagnostics for failed commands.Daniel Dunbar2009-07-014-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Not all tools give good error messages, and sometimes the tool can fail w/o any error (for example, when signalled). - We suppress this message when the failing command is the compiler and it failed normally (exit code == 1), under the assumption that it gave a good diagnostic. For example, for a linker failure we now get: -- ddunbar@lordcrumb:tmp$ clang a.c b.c ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o clang: error: linker command failed with exit code 1 (use -v to see invocation) -- For a compiler crash we get: -- ddunbar@lordcrumb:tmp$ clang t.i Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573. 0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38 ... stack trace and virtual stack trace follow ... clang: error: compiler command failed due to signal 6 (use -v to see invocation) -- But for a regular compilation failure we get the usual: -- ddunbar@lordcrumb:tmp$ clang c.c c.c:1:6: error: invalid token after top level declarator int x ^ 1 diagnostic generated. -- - No test case, not amenable to non-executable testing. :/ - <rdar://problem/6945613> llvm-svn: 74629
* Driver: Add Source argument for Commands to hold the Action which caused aDaniel Dunbar2009-07-013-17/+27
| | | | | | | Command to be generated, to support more advanced diagnostics. - No functionality change. llvm-svn: 74627
* Add header search path for Gentoo stable, x86_64 version.Sebastian Redl2009-07-011-0/+8
| | | | llvm-svn: 74626
* Update for LLVMContext+Module change.Owen Anderson2009-07-015-14/+26
| | | | llvm-svn: 74615
* Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.Douglas Gregor2009-07-012-5/+24
| | | | llvm-svn: 74606
* Rework Sema::CheckConditionalOperands(). No functionality change.Steve Naroff2009-07-013-98/+137
| | | | | | | | | This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). llvm-svn: 74604
* Implement Eli's feedback for vecto constant expressions;Nate Begeman2009-07-011-5/+52
| | | | | | | | | For ExtVectorType, initializer is splatted to all elements. For VectorType, initializer is bitcast to vector type. Verified that for VectorType, output is identical to gcc. llvm-svn: 74600
* use new and simplified LLVM APIs. Patch by Jay Foad!Chris Lattner2009-07-012-6/+3
| | | | llvm-svn: 74585
* Fix for PR4192: fix the definition of int64_t on x86_64 Linux.Eli Friedman2009-07-014-4/+20
| | | | | | | | | | | | | Note that I'm guessing that *BSD and Solaris do the same thing as Linux here, but it's quite possible I'm wrong; if the following testcase gives an error on x86-64 with gcc for any of those operating systems, please tell me: #include <stdint.h> int64_t x; long x; llvm-svn: 74583
* add fixme.Zhongxing Xu2009-07-012-0/+3
| | | | llvm-svn: 74581
* Cope with explicitly-specified function template arguments when thereDouglas Gregor2009-07-016-12/+50
| | | | | | | are fewer template arguments than there are template parameters for that function. llvm-svn: 74578
* When explicit template arguments are provided for a function call,Douglas Gregor2009-06-305-31/+172
| | | | | | | | | substitute those template arguments into the function parameter types prior to template argument deduction. There's still a bit of work to do to make this work properly when only some of the template arguments are specified. llvm-svn: 74576
* Patch to support optional nested-name-specifier in in ctor-initializerFariborz Jahanian2009-06-305-18/+43
| | | | | | list. llvm-svn: 74571
* Preliminary parsing and ASTs for template-ids that refer to functionDouglas Gregor2009-06-3012-17/+316
| | | | | | | templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. llvm-svn: 74563
* Update old CastRegion logic to not assume that ElementRegion's super region is aTed Kremenek2009-06-301-3/+3
| | | | | | | | TypedRegion. While we plan on removing this code at some point, it serves as a good reference implementation for use with BasicStore until we are sure the new CastRegion logic (in RegionStore.cpp) is correct. llvm-svn: 74559
* Fix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ↵Ted Kremenek2009-06-301-4/+4
| | | | | | | | | ParseDeclarationSpecifiers ... from ParseObjCTypeName) Another case where we should use SmallVector::data() instead of taking the address of element 0 of a SmallVector when the SmallVector has no elements. llvm-svn: 74556
* Diagnose multiple initialization of anonymous unionFariborz Jahanian2009-06-302-1/+16
| | | | | | fields in the ctor-initializer list. llvm-svn: 74554
* Combine two conditional branches into one. No functionality change.Ted Kremenek2009-06-301-8/+4
| | | | llvm-svn: 74552
* More diagnostics related to initialization of direct basesFariborz Jahanian2009-06-303-0/+23
| | | | | | in ctor-initializer list. llvm-svn: 74541
* When recursively instantiating function templates, keep track of theDouglas Gregor2009-06-305-9/+45
| | | | | | | | | | | | instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. llvm-svn: 74540
* Reapply r74532, and inherit from OSTargetInfo instead of from Target.Torok Edwin2009-06-301-353/+183
| | | | | | 'make test' passes now. llvm-svn: 74539
* Revert 74532 till I figure out why it breaks a bunch of tests.Torok Edwin2009-06-301-183/+353
| | | | llvm-svn: 74536
* Update C++ section data and directory structure to reflect N2914Douglas Gregor2009-06-301-1037/+1026
| | | | llvm-svn: 74535
* Compute ending of iterator in for-loop once.Fariborz Jahanian2009-06-301-16/+12
| | | | llvm-svn: 74533
* Use templates instead of creating a new class for each OS/Target combination.Torok Edwin2009-06-301-353/+183
| | | | | | | | This unifies all the targets supported by an OS into a template. It also cleans up the differences between the darwin targets. Also __LP64__ wasn't needed for *BSD, since x86-64 target defines it anyway. llvm-svn: 74532
* Refactor ActOnDeclarationNameExpr into a "parsing action" part and aDouglas Gregor2009-06-304-54/+72
| | | | | | | | | | | "semantic analysis" part. Use the "semantic analysis" part when performing template instantiation on a DeclRefExpr, rather than an ad hoc list of rules to construct DeclRefExprs from the instantiation. A test case for this change will come in with a large commit, which illustrates what I was actually trying to work on. llvm-svn: 74528
* Instead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.Zhongxing Xu2009-06-302-3/+11
| | | | | | | Mark the super region of the binding of block level expr in the Environment as live. llvm-svn: 74525
* When retrieving element region, if its super region has binding, returnZhongxing Xu2009-06-302-7/+25
| | | | | | | | | | | unknown for it. Mark the super region of a live region as live, if the live region is pointed to by a live pointer variable. These fixes xfail_regionstore_wine_crash.c. llvm-svn: 74524
* Block level expr should be visited. Otherwise variables in init expr ofZhongxing Xu2009-06-301-1/+3
| | | | | | | | | | DeclStmt would be dead before the DeclStmt. For example: int x = 0; int y = x; 'x' would be dead before 'int y = x'. llvm-svn: 74522
* add utility method.Zhongxing Xu2009-06-302-0/+9
| | | | llvm-svn: 74521
* add utility methods.Zhongxing Xu2009-06-301-0/+3
| | | | llvm-svn: 74520
* remove dead code.Zhongxing Xu2009-06-302-5/+0
| | | | llvm-svn: 74517
* We do not require the super region of element region be typed. So do notZhongxing Xu2009-06-301-3/+2
| | | | | | create TypedViewRegion for it. llvm-svn: 74516
* Implement PR4175, catching some questionable comparisons. Patch byChris Lattner2009-06-303-2/+37
| | | | | | David Majnemer! llvm-svn: 74513
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-3046-665/+562
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Introduce DeclContext::getParentASTContext().Argyrios Kyrtzidis2009-06-301-1/+5
| | | | | | It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext. llvm-svn: 74505
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-3026-55/+50
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the printing related methods of Decl.Argyrios Kyrtzidis2009-06-305-28/+22
| | | | llvm-svn: 74503
* Decl::getTranslationUnitDecl() should return itself when the Decl is a ↵Argyrios Kyrtzidis2009-06-301-0/+3
| | | | | | TranslationUnitDecl. llvm-svn: 74502
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-3033-228/+220
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.Chris Lattner2009-06-3027-91/+126
| | | | | | | | | | | | This is simple enough, but then I thought it would be nice to make PrintingPolicy get a LangOptions so that various things can key off "bool" and "C++" independently. This spiraled out of control. There are many fixme's, but I think things are slightly better than they were before. One thing that can be improved: CFG should probably have an ASTContext pointer in it, which would simplify its clients. llvm-svn: 74493
* Take care of Chris's comments.Fariborz Jahanian2009-06-302-15/+16
| | | | llvm-svn: 74486
* Make an error message more clear.Anders Carlsson2009-06-303-2/+4
| | | | llvm-svn: 74481
* A more detailed diagnosis of ill-formed ctor-initializerFariborz Jahanian2009-06-304-15/+33
| | | | | | list. llvm-svn: 74480
OpenPOWER on IntegriCloud