]> granicus.if.org Git - clang/log
clang
14 years agofix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.
Chris Lattner [Sat, 26 Jun 2010 22:18:28 +0000 (22:18 +0000)]
fix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106962 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove scalar inc/dec codegen into ScalarExprEmitter instead
Chris Lattner [Sat, 26 Jun 2010 22:09:34 +0000 (22:09 +0000)]
move scalar inc/dec codegen into ScalarExprEmitter instead
of being in CGF.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106961 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse more efficient type comparison predicates.
Chris Lattner [Sat, 26 Jun 2010 21:52:32 +0000 (21:52 +0000)]
use more efficient type comparison predicates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix unary minus to trap on overflow with -ftrapv, refactoring binop
Chris Lattner [Sat, 26 Jun 2010 21:48:21 +0000 (21:48 +0000)]
Fix unary minus to trap on overflow with -ftrapv, refactoring binop
code so we can use it from VisitUnaryMinus.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106957 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement support for -fwrapv, rdar://7221421
Chris Lattner [Sat, 26 Jun 2010 21:25:03 +0000 (21:25 +0000)]
Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement rdar://7432000 - signed negate should codegen as NSW.
Chris Lattner [Sat, 26 Jun 2010 20:27:24 +0000 (20:27 +0000)]
implement rdar://7432000 - signed negate should codegen as NSW.
While I'm in there, adjust pointer to member adjustments as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106955 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement support for #pragma message, patch by Michael Spencer!
Chris Lattner [Sat, 26 Jun 2010 17:11:39 +0000 (17:11 +0000)]
Implement support for #pragma message, patch by Michael Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange EmitReferenceBindingToExpr to take a decl instead of a boolean.
Anders Carlsson [Sat, 26 Jun 2010 16:35:32 +0000 (16:35 +0000)]
Change EmitReferenceBindingToExpr to take a decl instead of a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106949 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd function for mangling reference temporaries.
Anders Carlsson [Sat, 26 Jun 2010 16:09:40 +0000 (16:09 +0000)]
Add function for mangling reference temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106948 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.
Charles Davis [Sat, 26 Jun 2010 03:50:05 +0000 (03:50 +0000)]
Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.

Also, fix mangling of throw specs. Turns out MSVC totally ignores throw
specs when mangling names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106937 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove cruft that I didn't intend to commit.
Daniel Dunbar [Sat, 26 Jun 2010 00:31:14 +0000 (00:31 +0000)]
Remove cruft that I didn't intend to commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106932 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a missing dependency to try to fix a buildbot failure.
Bob Wilson [Sat, 26 Jun 2010 00:03:23 +0000 (00:03 +0000)]
Add a missing dependency to try to fix a buildbot failure.
It complained with:

llvm[5]: Building Clang arm_neon.h.inc with tblgen
cp: cannot create regular file `/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/Release/lib/clang/2.0/include/arm_neon.h': No such file or directory

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106922 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRelax assertion since non-pod C++ classes are not aggregates, but still can appear...
Ted Kremenek [Fri, 25 Jun 2010 23:51:38 +0000 (23:51 +0000)]
Relax assertion since non-pod C++ classes are not aggregates, but still can appear in this context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106919 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for CXXRecordDecl in CFGRecStmtDeclVisitor.
Ted Kremenek [Fri, 25 Jun 2010 23:51:34 +0000 (23:51 +0000)]
Add support for CXXRecordDecl in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106918 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoclang: Derive version name from LLVM unless specified explicitly. This means
Daniel Dunbar [Fri, 25 Jun 2010 23:34:47 +0000 (23:34 +0000)]
clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen a constant size array is casted to another type, its length should be scaled...
Jordy Rose [Fri, 25 Jun 2010 23:23:04 +0000 (23:23 +0000)]
When a constant size array is casted to another type, its length should be scaled as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106911 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd dead stores C++ test case that was previously asserting due to an
Ted Kremenek [Fri, 25 Jun 2010 22:48:52 +0000 (22:48 +0000)]
Add dead stores C++ test case that was previously asserting due to an
invalid source range for CXXNewExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106904 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse TypeSourceInfo to help determine the SourceRange of a CXXNewExpr. This fixes...
Ted Kremenek [Fri, 25 Jun 2010 22:48:49 +0000 (22:48 +0000)]
Use TypeSourceInfo to help determine the SourceRange of a CXXNewExpr.  This fixes several
cases where we generated an invalid SourceRange for this expression.  Thanks to John McCall
for helping me figure this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106903 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTry making BuildBot happy again.
Fariborz Jahanian [Fri, 25 Jun 2010 22:32:31 +0000 (22:32 +0000)]
Try making BuildBot happy again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106898 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest case for pr7490.
Fariborz Jahanian [Fri, 25 Jun 2010 21:08:10 +0000 (21:08 +0000)]
Test case for pr7490.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106887 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd "checker caching" to GRExprEngine::CheckerVisit to progressively build
Ted Kremenek [Fri, 25 Jun 2010 20:59:31 +0000 (20:59 +0000)]
Add "checker caching" to GRExprEngine::CheckerVisit to progressively build
a winowed list of checkers that actually do something for a given StmtClass.
As the number of checkers grows, this may potentially significantly reduce
the number of checkers called at any one time.  My own measurements show that
for the ~20 registered Checker objects, only ~5 of them respond at any one time
to a give statement.  While this isn't a net performance win right now (there
is a minor slowdown on sqlite.3) this improvement does greatly improve debugging
when stepping through the checkers used to evaluate a given statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106884 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix -analyze-display-progress (once again), this time with an additional regression...
Ted Kremenek [Fri, 25 Jun 2010 20:59:24 +0000 (20:59 +0000)]
Fix -analyze-display-progress (once again), this time with an additional regression test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106883 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMinor change to my last patch to fix PR7490.
Fariborz Jahanian [Fri, 25 Jun 2010 20:01:13 +0000 (20:01 +0000)]
Minor change to my last patch to fix PR7490.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106875 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTranslate numbers properly.
Eric Christopher [Fri, 25 Jun 2010 19:04:52 +0000 (19:04 +0000)]
Translate numbers properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106873 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRGen for trivial initialization of dynamiccaly allocated
Fariborz Jahanian [Fri, 25 Jun 2010 18:26:07 +0000 (18:26 +0000)]
IRGen for trivial initialization of dynamiccaly allocated
array of other done c++ objects. Fixes PR7490.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106869 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange RegionStoreManager::Retrieve to infer the type of a symbolic region from the...
Tom Care [Fri, 25 Jun 2010 18:22:31 +0000 (18:22 +0000)]
Change RegionStoreManager::Retrieve to infer the type of a symbolic region from the context when it is not already available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106868 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agobuild: Get CLANG_VERSION from Version.inc instead of depending on VER file directly.
Daniel Dunbar [Fri, 25 Jun 2010 17:33:49 +0000 (17:33 +0000)]
build: Get CLANG_VERSION from Version.inc instead of depending on VER file directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106864 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agobuild: Add a generated Version.inc file instead of duplicating information.
Daniel Dunbar [Fri, 25 Jun 2010 17:33:46 +0000 (17:33 +0000)]
build: Add a generated Version.inc file instead of duplicating information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106863 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport NonTypeTemplateParmDecl for PCH.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:25:09 +0000 (16:25 +0000)]
Support NonTypeTemplateParmDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake PCHWriter::FlushStmts() robust. If we added null Stmts, reading them back got...
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:25:02 +0000 (16:25 +0000)]
Make PCHWriter::FlushStmts() robust. If we added null Stmts, reading them back got messed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106859 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport DependentTemplateSpecializationType and ElaboratedType for PCH.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:24:58 +0000 (16:24 +0000)]
Support DependentTemplateSpecializationType and ElaboratedType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106858 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd forgotten breaks in case statements.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:24:51 +0000 (16:24 +0000)]
Add forgotten breaks in case statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106857 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA bug I've introduced in STDIN handling surfaced a few broken tests, fix them.
Benjamin Kramer [Fri, 25 Jun 2010 12:48:07 +0000 (12:48 +0000)]
A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.

Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106840 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport UnresolvedLookupExpr for PCH.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:34 +0000 (09:03 +0000)]
Support UnresolvedLookupExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106832 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport UnresolvedMemberExpr for PCH.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:26 +0000 (09:03 +0000)]
Support UnresolvedMemberExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106831 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrint source location when we encounter unhandled statement during PCH writing.
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:12 +0000 (09:03 +0000)]
Print source location when we encounter unhandled statement during PCH writing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106830 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoI don't know when I committed this, but it's probably a "bad thing".
Chris Lattner [Fri, 25 Jun 2010 05:00:29 +0000 (05:00 +0000)]
I don't know when I committed this, but it's probably a "bad thing".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106821 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement dependent alignment attribute support. This is a bit gross given the
Chandler Carruth [Fri, 25 Jun 2010 03:22:07 +0000 (03:22 +0000)]
Implement dependent alignment attribute support. This is a bit gross given the
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.

This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.

Thanks to John for walking me through some of this. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment for my last patch.
Fariborz Jahanian [Fri, 25 Jun 2010 00:05:45 +0000 (00:05 +0000)]
Add comment for my last patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed another double-char in PPC-specific asm constraints.
John Thompson [Fri, 25 Jun 2010 00:02:05 +0000 (00:02 +0000)]
Fixed another double-char in PPC-specific asm constraints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106812 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded PPC-specific asm constraints, PS3 configuration changes.
John Thompson [Thu, 24 Jun 2010 22:44:13 +0000 (22:44 +0000)]
Added PPC-specific asm constraints, PS3 configuration changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106806 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove HAS_TLS define.
Eric Christopher [Thu, 24 Jun 2010 20:41:41 +0000 (20:41 +0000)]
Remove HAS_TLS define.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106786 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixes a regression when redeclaration of a global satic
Fariborz Jahanian [Thu, 24 Jun 2010 18:50:41 +0000 (18:50 +0000)]
Fixes a regression when redeclaration of a global satic
is an extern local to a function. Radar 8125274.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106773 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRenamed selactor-expr-lvalue.mm to selector-expr-lvalue.mm.
Fariborz Jahanian [Thu, 24 Jun 2010 16:40:16 +0000 (16:40 +0000)]
Renamed selactor-expr-lvalue.mm to selector-expr-lvalue.mm.
Thanks Daniel D.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106758 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReturn null pointer instead of 'false' (fixes clang warning).
Ted Kremenek [Thu, 24 Jun 2010 16:26:12 +0000 (16:26 +0000)]
Return null pointer instead of 'false' (fixes clang warning).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106755 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd check for illegal whence argument of fseek.
Zhongxing Xu [Thu, 24 Jun 2010 13:36:41 +0000 (13:36 +0000)]
Add check for illegal whence argument of fseek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106742 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoShould return stateNotNull.
Zhongxing Xu [Thu, 24 Jun 2010 13:09:02 +0000 (13:09 +0000)]
Should return stateNotNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106741 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLet StreamChecker::CheckNullStream() return a GRState after successful check.
Zhongxing Xu [Thu, 24 Jun 2010 12:52:28 +0000 (12:52 +0000)]
Let StreamChecker::CheckNullStream() return a GRState after successful check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106738 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't depend on system headers in clang -cc1 tests.
Benjamin Kramer [Thu, 24 Jun 2010 11:06:12 +0000 (11:06 +0000)]
Don't depend on system headers in clang -cc1 tests.

The constant was copied from clang's limits.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106732 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport a couple more C++ Exprs for PCH.
Argyrios Kyrtzidis [Thu, 24 Jun 2010 08:57:31 +0000 (08:57 +0000)]
Support a couple more C++ Exprs for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix broken de/serialization for a couple of C++ Exprs.
Argyrios Kyrtzidis [Thu, 24 Jun 2010 08:57:09 +0000 (08:57 +0000)]
Fix broken de/serialization for a couple of C++ Exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106726 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore clang support for darwin tls. Add a __has_feature macro and
Eric Christopher [Thu, 24 Jun 2010 02:02:00 +0000 (02:02 +0000)]
More clang support for darwin tls.  Add a __has_feature macro and
target specific preprocessor define as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106715 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPatch to correctly mangle block helper functions
Fariborz Jahanian [Thu, 24 Jun 2010 00:08:06 +0000 (00:08 +0000)]
Patch to correctly mangle block helper functions
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd 'VisitEndAnalysis' callback to Checker class. This callback is called by GRExprE...
Ted Kremenek [Wed, 23 Jun 2010 22:08:00 +0000 (22:08 +0000)]
Add 'VisitEndAnalysis' callback to Checker class.  This callback is called by GRExprEngine
when the worklist algorithm has terminated.  This allows some checkers to do a post-analysis
phase after all paths have been analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106689 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd parentheses suggested by gcc.
Duncan Sands [Wed, 23 Jun 2010 19:34:52 +0000 (19:34 +0000)]
Add parentheses suggested by gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106668 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert "Tweak tests to hopefully fix include of limits.h on win32.", tweak fails...
Daniel Dunbar [Wed, 23 Jun 2010 18:31:33 +0000 (18:31 +0000)]
Revert "Tweak tests to hopefully fix include of limits.h on win32.", tweak fails on linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106661 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Add make variable to allow disabling default integrated assembler, till
Daniel Dunbar [Wed, 23 Jun 2010 18:15:13 +0000 (18:15 +0000)]
Driver: Add make variable to allow disabling default integrated assembler, till
all the kinks are worked out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106641 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd USR tests for ObjC class extensions.
Ted Kremenek [Wed, 23 Jun 2010 18:10:30 +0000 (18:10 +0000)]
Add USR tests for ObjC class extensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106640 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak tests to hopefully fix include of limits.h on win32.
Daniel Dunbar [Wed, 23 Jun 2010 18:06:20 +0000 (18:06 +0000)]
Tweak tests to hopefully fix include of limits.h on win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106639 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd isArrayType() to CanProxy's forwarders.
Sebastian Redl [Wed, 23 Jun 2010 15:57:03 +0000 (15:57 +0000)]
Add isArrayType() to CanProxy's forwarders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106629 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport C++ class template specializations and partial specializations for PCH.
Argyrios Kyrtzidis [Wed, 23 Jun 2010 13:48:30 +0000 (13:48 +0000)]
Support C++ class template specializations and partial specializations for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106625 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoModify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl...
Argyrios Kyrtzidis [Wed, 23 Jun 2010 13:48:23 +0000 (13:48 +0000)]
Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106624 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove altivec vector bool/pixel support, patch by Anton Yartsev
Chris Lattner [Wed, 23 Jun 2010 06:00:24 +0000 (06:00 +0000)]
improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopolish the -finstrument-functions implementation, patch by Nelson Elhage!
Chris Lattner [Wed, 23 Jun 2010 05:21:28 +0000 (05:21 +0000)]
polish the -finstrument-functions implementation, patch by Nelson Elhage!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106618 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd comments.
Zhongxing Xu [Wed, 23 Jun 2010 02:12:00 +0000 (02:12 +0000)]
add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106617 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd comments.
Zhongxing Xu [Wed, 23 Jun 2010 02:06:56 +0000 (02:06 +0000)]
add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106616 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrectly construct an ElementRegion for alloca() + pointer arithmetic. Fixes analyzer
Ted Kremenek [Tue, 22 Jun 2010 23:58:31 +0000 (23:58 +0000)]
Correctly construct an ElementRegion for alloca() + pointer arithmetic.  Fixes analyzer
crash reported in PR 7450.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106609 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoString literals enclosed in parentheses are still string
Douglas Gregor [Tue, 22 Jun 2010 23:47:37 +0000 (23:47 +0000)]
String literals enclosed in parentheses are still string
literals. Fixes PR7488.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106607 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake c++ and C++ valid extensions for C++ source files, from Seth Cantrell!
Douglas Gregor [Tue, 22 Jun 2010 23:43:22 +0000 (23:43 +0000)]
Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106602 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVector types are not arithmetic types, either. Note that we now ban
Douglas Gregor [Tue, 22 Jun 2010 23:41:02 +0000 (23:41 +0000)]
Vector types are not arithmetic types, either. Note that we now ban
__real myvec and __imag myvec, since they aren't all that useful (it's
just an identity function) but we might want to use them in more
restricted cases in the future (e.g., "__real mycomplexvec" could
extract the real parts of a vector of complex numbers).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106601 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPatch to provide separate ASTs for multiple ObjC class extension
Fariborz Jahanian [Tue, 22 Jun 2010 23:20:40 +0000 (23:20 +0000)]
Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach Type::isRealType() that vector types are never real types. All
Douglas Gregor [Tue, 22 Jun 2010 23:13:52 +0000 (23:13 +0000)]
Teach Type::isRealType() that vector types are never real types. All
of the callers of isRealType() already assumed this, and one of them
(increment/decrement) mistakenly permitted increments of vector types
because of it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106596 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoType Type::isRealFloatingType() that vectors are not floating-point
Douglas Gregor [Tue, 22 Jun 2010 23:07:26 +0000 (23:07 +0000)]
Type Type::isRealFloatingType() that vectors are not floating-point
types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport -mios-version-min= as an alias for -miphoneos-version-min=.
Daniel Dunbar [Tue, 22 Jun 2010 22:27:12 +0000 (22:27 +0000)]
Support -mios-version-min= as an alias for -miphoneos-version-min=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106587 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange Type::isFloatingType() to reflect the actual definition of a
Douglas Gregor [Tue, 22 Jun 2010 22:12:46 +0000 (22:12 +0000)]
Change Type::isFloatingType() to reflect the actual definition of a
"floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Remove some dead code left around after a refactoring. Found by the
Daniel Dunbar [Tue, 22 Jun 2010 20:18:18 +0000 (20:18 +0000)]
Driver: Remove some dead code left around after a refactoring. Found by the
Clang static analyzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106568 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't assert on C++ casts that are currently not handled by the static analyzer.
Ted Kremenek [Tue, 22 Jun 2010 19:05:10 +0000 (19:05 +0000)]
Don't assert on C++ casts that are currently not handled by the static analyzer.
Instead, halt the analysis of the current path, which is what we do in GRExprEngine::ProcessStmt
for all other C++ constructs not currently handled by the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106561 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrying to make BuildBot happy again (related to PR7431).
Fariborz Jahanian [Tue, 22 Jun 2010 17:08:32 +0000 (17:08 +0000)]
Trying to make BuildBot happy again (related to PR7431).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106553 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRead/write CXXDeleteExpr from/to PCH.
Argyrios Kyrtzidis [Tue, 22 Jun 2010 17:07:59 +0000 (17:07 +0000)]
Read/write CXXDeleteExpr from/to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106552 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't allow vector conversions to sneak in under the guise of
Douglas Gregor [Tue, 22 Jun 2010 16:52:27 +0000 (16:52 +0000)]
Don't allow vector conversions to sneak in under the guise of
floating-point conversions or floating-integral conversions. We
really, really, really need to make isFloatingType() and friends not
apply to vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106551 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixes a problem in generation of meta-data for
Fariborz Jahanian [Tue, 22 Jun 2010 16:33:55 +0000 (16:33 +0000)]
Fixes a problem in generation of meta-data for
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106550 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch over to the new caching version of getMangledName.
Anders Carlsson [Tue, 22 Jun 2010 16:16:50 +0000 (16:16 +0000)]
Switch over to the new caching version of getMangledName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a new variant of getMangledName that caches the mangling for decls.
Anders Carlsson [Tue, 22 Jun 2010 16:05:32 +0000 (16:05 +0000)]
Add a new variant of getMangledName that caches the mangling for decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106547 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd GlobalDecl::getCanonicalDecl.
Anders Carlsson [Tue, 22 Jun 2010 16:00:14 +0000 (16:00 +0000)]
Add GlobalDecl::getCanonicalDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106546 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we ask for the enumerators of an EnumDecl, make sure we get them even if we...
Douglas Gregor [Tue, 22 Jun 2010 14:45:56 +0000 (14:45 +0000)]
When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106541 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIn C++, allow a declaration of an enum to follow a definition of that
Douglas Gregor [Tue, 22 Jun 2010 14:26:35 +0000 (14:26 +0000)]
In C++, allow a declaration of an enum to follow a definition of that
enum as a GNU extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR7180.
Argyrios Kyrtzidis [Tue, 22 Jun 2010 11:30:04 +0000 (11:30 +0000)]
Fix PR7180.

For

void f( a::b::c );

we would cache the tokens "a::b::" but then we would try to annotate them using the range "a::".
Before annotating them with the (invalid) C++ scope spec, set it to the range of "a::b::".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106536 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport emitting/reading function templates to/from PCH.
Argyrios Kyrtzidis [Tue, 22 Jun 2010 09:55:07 +0000 (09:55 +0000)]
Support emitting/reading function templates to/from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106534 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago-Introduce PCHReader::ReadTemplateArgumentLoc()
Argyrios Kyrtzidis [Tue, 22 Jun 2010 09:54:59 +0000 (09:54 +0000)]
-Introduce PCHReader::ReadTemplateArgumentLoc()
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
  and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106533 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake it easier to read/write the template part of FunctionDecl.
Argyrios Kyrtzidis [Tue, 22 Jun 2010 09:54:51 +0000 (09:54 +0000)]
Make it easier to read/write the template part of FunctionDecl.

Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
  FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
  TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106532 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSilence warning about C++-style comments.
Benjamin Kramer [Tue, 22 Jun 2010 09:29:44 +0000 (09:29 +0000)]
Silence warning about C++-style comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106531 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a bunch of stream APIs to SteamChecker.
Zhongxing Xu [Tue, 22 Jun 2010 07:50:21 +0000 (07:50 +0000)]
Add a bunch of stream APIs to SteamChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106530 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoApply array-to-pointer decay when instantiating a MemberExpr. Fixes
Douglas Gregor [Tue, 22 Jun 2010 02:41:05 +0000 (02:41 +0000)]
Apply array-to-pointer decay when instantiating a MemberExpr. Fixes
PR7405, patch by Kyle Lippincott!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106523 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttempt to fix test
Douglas Gregor [Tue, 22 Jun 2010 02:17:07 +0000 (02:17 +0000)]
Attempt to fix test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106522 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPer Chris's comment, remove another static (this one
Fariborz Jahanian [Tue, 22 Jun 2010 00:23:08 +0000 (00:23 +0000)]
Per Chris's comment, remove another static (this one
is a static comparator operator).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106511 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement support for -finstrument-functions, patch by Nelson
Chris Lattner [Tue, 22 Jun 2010 00:03:40 +0000 (00:03 +0000)]
implement support for -finstrument-functions, patch by Nelson
Elhage!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAlter the internal representation of the condition variable in
Douglas Gregor [Mon, 21 Jun 2010 23:44:13 +0000 (23:44 +0000)]
Alter the internal representation of the condition variable in
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.

In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.

Fixes the remainder of <rdar://problem/8104754>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106504 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid using a local static for providing lexical
Fariborz Jahanian [Mon, 21 Jun 2010 23:31:29 +0000 (23:31 +0000)]
Avoid using a local static for providing lexical
order of priorotized global object initializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106503 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoZero out a stale pointer
Douglas Gregor [Mon, 21 Jun 2010 22:46:46 +0000 (22:46 +0000)]
Zero out a stale pointer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106497 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen semantic analysis fail to introduce a class or class template,
Douglas Gregor [Mon, 21 Jun 2010 22:31:09 +0000 (22:31 +0000)]
When semantic analysis fail to introduce a class or class template,
just skip over the body of the class or class template: it's a
semantic disaster that's likely to cause invariants to break. Fixes
part of <rdar://problem/8104754>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106496 91177308-0d34-0410-b5e6-96231b3b80d8