aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-07-01Add header search path for Gentoo stable, x86_64 version.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74626 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Update for LLVMContext+Module change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Rework Sema::CheckConditionalOperands(). No functionality change.Steve Naroff
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Implement Eli's feedback for vecto constant expressions;Nate Begeman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01use new and simplified LLVM APIs. Patch by Jay Foad!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Fix for PR4192: fix the definition of int64_t on x86_64 Linux.Eli Friedman
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; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01add fixme.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74581 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Cope with explicitly-specified function template arguments when thereDouglas Gregor
are fewer template arguments than there are template parameters for that function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30When explicit template arguments are provided for a function call,Douglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Patch to support optional nested-name-specifier in in ctor-initializerFariborz Jahanian
list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Preliminary parsing and ASTs for template-ids that refer to functionDouglas Gregor
templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Update old CastRegion logic to not assume that ElementRegion's super region is aTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Fix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ↵Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74556 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Diagnose multiple initialization of anonymous unionFariborz Jahanian
fields in the ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Combine two conditional branches into one. No functionality change.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30More diagnostics related to initialization of direct basesFariborz Jahanian
in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30When recursively instantiating function templates, keep track of theDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Reapply r74532, and inherit from OSTargetInfo instead of from Target.Torok Edwin
'make test' passes now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Revert 74532 till I figure out why it breaks a bunch of tests.Torok Edwin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Update C++ section data and directory structure to reflect N2914Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Compute ending of iterator in for-loop once.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Use templates instead of creating a new class for each OS/Target combination.Torok Edwin
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Refactor ActOnDeclarationNameExpr into a "parsing action" part and aDouglas Gregor
"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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Instead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.Zhongxing Xu
Mark the super region of the binding of block level expr in the Environment as live. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30When retrieving element region, if its super region has binding, returnZhongxing Xu
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Block level expr should be visited. Otherwise variables in init expr ofZhongxing Xu
DeclStmt would be dead before the DeclStmt. For example: int x = 0; int y = x; 'x' would be dead before 'int y = x'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30add utility method.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30add utility methods.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30remove dead code.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30We do not require the super region of element region be typed. So do notZhongxing Xu
create TypedViewRegion for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Implement PR4175, catching some questionable comparisons. Patch byChris Lattner
David Majnemer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30De-ASTContext-ify DeclContext.Argyrios Kyrtzidis
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Introduce DeclContext::getParentASTContext().Argyrios Kyrtzidis
It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74505 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis
subclasses. Timings showed no significant difference before and after the commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Remove the ASTContext parameter from the printing related methods of Decl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Decl::getTranslationUnitDecl() should return itself when the Decl is a ↵Argyrios Kyrtzidis
TranslationUnitDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Take care of Chris's comments.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Make an error message more clear.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30A more detailed diagnosis of ill-formed ctor-initializerFariborz Jahanian
list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Use true/false instead of 1/0.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Improvements to decltype. We now don't crash anymore when the expr is an ↵Anders Carlsson
overloaded function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Don't define __KPRINTF_ATTRIBUTE__ unconditionally on OpenBSD.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Improve code generation for function template specializations:Douglas Gregor
- Track implicit instantiations vs. the not-yet-supported explicit specializations - Give implicit instantiations of function templates (and member functions of class templates) linkonce_odr linkage. - Improve name mangling for function template specializations, including the template arguments of the instantiation and the return type of the function. Note that our name-mangling is improved, but not correct: we still don't mangle substitutions, although the manglings we produce can be demangled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Diagnose multiple initialzation of data-member/base Fariborz Jahanian
in the ctor-initializer list. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Remove some dead codeAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29Keep track of function template specializations, to eliminateDouglas Gregor
redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29OpenBSD support.Daniel Dunbar
- Patch by Jonathan Gray! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74453 91177308-0d34-0410-b5e6-96231b3b80d8