]> granicus.if.org Git - clang/log
clang
14 years agoReplace some SmallVectors with arrays.
Benjamin Kramer [Thu, 18 Mar 2010 16:59:57 +0000 (16:59 +0000)]
Replace some SmallVectors with arrays.

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

14 years agoDefang
Douglas Gregor [Thu, 18 Mar 2010 15:37:47 +0000 (15:37 +0000)]
Defang

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

14 years agoMore token-annotation experimentation, preprocessing the annotated
Douglas Gregor [Thu, 18 Mar 2010 15:23:44 +0000 (15:23 +0000)]
More token-annotation experimentation, preprocessing the annotated
token sequence to detect macro instantiations (that produce at least
token). WIP.

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

14 years agoDefang a test that's failing intermittently on windows
Douglas Gregor [Thu, 18 Mar 2010 14:59:12 +0000 (14:59 +0000)]
Defang a test that's failing intermittently on windows

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

14 years agoFix 80 col violation
Kovarththanan Rajaratnam [Thu, 18 Mar 2010 13:56:20 +0000 (13:56 +0000)]
Fix 80 col violation

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

14 years agoSimply tags target
Kovarththanan Rajaratnam [Thu, 18 Mar 2010 13:52:43 +0000 (13:52 +0000)]
Simply tags target

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

14 years agofrom code inspection, we were treating placement news with one argument as
John McCall [Thu, 18 Mar 2010 08:19:33 +0000 (08:19 +0000)]
from code inspection, we were treating placement news with one argument as
non-placement news when selecting the corresponding operator delete;  this is
fixed.
Access and ambiguity control for calls to operator new and delete.  Also AFAICT

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

14 years agoMake some typedefs private
Kovarththanan Rajaratnam [Thu, 18 Mar 2010 07:45:30 +0000 (07:45 +0000)]
Make some typedefs private

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

14 years agoRename variable to indicate what it is being used for
Kovarththanan Rajaratnam [Thu, 18 Mar 2010 07:18:10 +0000 (07:18 +0000)]
Rename variable to indicate what it is being used for

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

14 years agoRedeclaration lookups for parameter names should be flagged as redeclaration lookups
John McCall [Thu, 18 Mar 2010 06:42:38 +0000 (06:42 +0000)]
Redeclaration lookups for parameter names should be flagged as redeclaration lookups
so they don't trigger diagnostics like (say) access control.

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

14 years agoBump clang minor version (1.5).
Ted Kremenek [Thu, 18 Mar 2010 04:39:55 +0000 (04:39 +0000)]
Bump clang minor version (1.5).

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

14 years agoRefactor argument checking in CallAndMessageChecker to be the same
Ted Kremenek [Thu, 18 Mar 2010 03:22:29 +0000 (03:22 +0000)]
Refactor argument checking in CallAndMessageChecker to be the same
for both CallExprs and ObjCMessageExprs.

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

14 years agoWhen dumping vtables, also dump the thunks.
Anders Carlsson [Thu, 18 Mar 2010 02:44:19 +0000 (02:44 +0000)]
When dumping vtables, also dump the thunks.

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

14 years agoDetect pass-by-value arguments that are structs that contain
Ted Kremenek [Thu, 18 Mar 2010 02:17:27 +0000 (02:17 +0000)]
Detect pass-by-value arguments that are structs that contain
uninitialized data.

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

14 years agoTweak dead stores checker to not emit a warning when initialization
Ted Kremenek [Thu, 18 Mar 2010 01:22:39 +0000 (01:22 +0000)]
Tweak dead stores checker to not emit a warning when initialization
a scalar variable with a scalar parameter.  This is a
form of defensive programming.  If the variable is unused,
it will be caused by -Wunused-variable.

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

14 years agoSimplify code (and remove 'dyn_cast') by using ObjCProperyDecl::findPropertyDecl().
Ted Kremenek [Thu, 18 Mar 2010 01:22:36 +0000 (01:22 +0000)]
Simplify code (and remove 'dyn_cast') by using ObjCProperyDecl::findPropertyDecl().

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

14 years agoTurn several PCH reader assertions into compiler errors, thus making
Ted Kremenek [Thu, 18 Mar 2010 00:56:54 +0000 (00:56 +0000)]
Turn several PCH reader assertions into compiler errors, thus making
the PCHReader more robust to corrupt or invalid PCH files.

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

14 years agoExperimental stab at using relexing to identify preprocessor
Douglas Gregor [Thu, 18 Mar 2010 00:42:48 +0000 (00:42 +0000)]
Experimental stab at using relexing to identify preprocessor
directives while annotating tokens in CIndex. This functionality
should probably be factored out of this routine, but we're not there
yet.

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

14 years agoMore work on thunks.
Anders Carlsson [Wed, 17 Mar 2010 20:06:32 +0000 (20:06 +0000)]
More work on thunks.

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

14 years agoImplement non-dependent friend functions and classes.
John McCall [Wed, 17 Mar 2010 20:01:29 +0000 (20:01 +0000)]
Implement non-dependent friend functions and classes.

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

14 years agoActOnTagDefinitionError is supposed to 'unwind' ActOnTagStartDefinition, not
John McCall [Wed, 17 Mar 2010 19:25:57 +0000 (19:25 +0000)]
ActOnTagDefinitionError is supposed to 'unwind' ActOnTagStartDefinition, not
ActOnStartCXXMemberDeclaration.  We haven't started the field collector on this
class yet, so don't stop it.  Fixes a crash in the VS buildbot and a memory error
on all the others.

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

14 years agoReduce the default alignment for ASTContext and Stmt/Expr allocation
Douglas Gregor [Wed, 17 Mar 2010 18:46:59 +0000 (18:46 +0000)]
Reduce the default alignment for ASTContext and Stmt/Expr allocation
from 16 bytes to 8 bytes, since we don't ever use those low 4
bits. Should save some storage.

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

14 years agoXFAIL this test on that silly Windows platform. Grrr
Douglas Gregor [Wed, 17 Mar 2010 18:28:02 +0000 (18:28 +0000)]
XFAIL this test on that silly Windows platform. Grrr

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

14 years agoRemove this test. It is causing problems has has relatively little value
Douglas Gregor [Wed, 17 Mar 2010 16:04:04 +0000 (16:04 +0000)]
Remove this test. It is causing problems has has relatively little value

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

14 years agoRemove warning about shadowing a built-in; built-ins aren't actually
Douglas Gregor [Wed, 17 Mar 2010 16:03:44 +0000 (16:03 +0000)]
Remove warning about shadowing a built-in; built-ins aren't actually
considered to be a part of the translation unit unless they're named
in a way that brings them into existence.

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

14 years agoEntering the main source file in the preprocessor can fail if the
Douglas Gregor [Wed, 17 Mar 2010 15:44:30 +0000 (15:44 +0000)]
Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully.

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

14 years agoCheck the inode in addition to size and modification time to determine
Douglas Gregor [Wed, 17 Mar 2010 15:33:06 +0000 (15:33 +0000)]
Check the inode in addition to size and modification time to determine
whether a file has changed since it was originally read.

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

14 years agoUse a simple diagnostic (file modified) when we detect that a file has
Douglas Gregor [Wed, 17 Mar 2010 15:30:15 +0000 (15:30 +0000)]
Use a simple diagnostic (file modified) when we detect that a file has
changed, rather than trying to point out how it changed. The "why"
doesn't matter.

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

14 years agoSimplify error path using OwningPtr
Kovarththanan Rajaratnam [Wed, 17 Mar 2010 09:47:30 +0000 (09:47 +0000)]
Simplify error path using OwningPtr

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

14 years agoSimplify ProcessWarningOptions since it can't fail
Kovarththanan Rajaratnam [Wed, 17 Mar 2010 09:36:02 +0000 (09:36 +0000)]
Simplify ProcessWarningOptions since it can't fail

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

14 years agoRemove useless forward decl.
Kovarththanan Rajaratnam [Wed, 17 Mar 2010 09:25:49 +0000 (09:25 +0000)]
Remove useless forward decl.

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

14 years agoIssue a proper diagnostic if we couldn't open dump file
Kovarththanan Rajaratnam [Wed, 17 Mar 2010 09:24:48 +0000 (09:24 +0000)]
Issue a proper diagnostic if we couldn't open dump file

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

14 years agoRemove useless foward decl.
Kovarththanan Rajaratnam [Wed, 17 Mar 2010 08:44:19 +0000 (08:44 +0000)]
Remove useless foward decl.

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

14 years agoAdd another compatibility note and tweak a few of the existing ones.
John McCall [Wed, 17 Mar 2010 07:10:56 +0000 (07:10 +0000)]
Add another compatibility note and tweak a few of the existing ones.

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

14 years agoFix a typo in a tag.
Chandler Carruth [Wed, 17 Mar 2010 05:46:21 +0000 (05:46 +0000)]
Fix a typo in a tag.

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

14 years agoGrant nested classes the access privileges of their enclosing classes.
John McCall [Wed, 17 Mar 2010 04:58:56 +0000 (04:58 +0000)]
Grant nested classes the access privileges of their enclosing classes.

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

14 years agoDocument common clang compatibility issues.
Rafael Espindola [Wed, 17 Mar 2010 04:31:53 +0000 (04:31 +0000)]
Document common clang compatibility issues.

Patch by Zhanyong Wan.

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

14 years agoCorrectly mangle dependent TypenameType.
Rafael Espindola [Wed, 17 Mar 2010 04:28:11 +0000 (04:28 +0000)]
Correctly mangle dependent TypenameType.
Fixes PR6625.

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

14 years agoMark CXXThisRegion in the current or parent stack frame context as live so that
Zhongxing Xu [Wed, 17 Mar 2010 03:35:08 +0000 (03:35 +0000)]
Mark CXXThisRegion in the current or parent stack frame context as live so that
their bindings are not removed.

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

14 years agoMake -faccess-control and -fno-access-control driver options.
John McCall [Wed, 17 Mar 2010 01:32:13 +0000 (01:32 +0000)]
Make -faccess-control and -fno-access-control driver options.

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

14 years agoProvide a test case for PR6629.
John McCall [Wed, 17 Mar 2010 01:31:25 +0000 (01:31 +0000)]
Provide a test case for PR6629.

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

14 years agoClean up after ourselves when there's an error parsing the base clause.
John McCall [Wed, 17 Mar 2010 00:38:33 +0000 (00:38 +0000)]
Clean up after ourselves when there's an error parsing the base clause.
Fixes the crash-on-invalid in PR6629.

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

14 years agoDon't "take" the file manager and source manager when
Douglas Gregor [Wed, 17 Mar 2010 00:32:06 +0000 (00:32 +0000)]
Don't "take" the file manager and source manager when
ASTUnit::LoadFromCompilerInvocation() fails to create target
information.

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

14 years agoobjective-c patch to provide type safty when blocks are passing or
Fariborz Jahanian [Wed, 17 Mar 2010 00:20:01 +0000 (00:20 +0000)]
objective-c patch to provide type safty when blocks are passing or
returning objc objects. There will be a corresponding objective-c++
patch soon.

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

14 years agoEmit output of PCH consistency checking test case to a separate text file and grep...
Douglas Gregor [Wed, 17 Mar 2010 00:09:23 +0000 (00:09 +0000)]
Emit output of PCH consistency checking test case to a separate text file and grep that

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

14 years agoIssue error when a byref array is accessed in a block
Fariborz Jahanian [Tue, 16 Mar 2010 23:39:51 +0000 (23:39 +0000)]
Issue error when a byref array is accessed in a block
literal. Fixes radar 7760213.

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

14 years agoRemove unused variable
Douglas Gregor [Tue, 16 Mar 2010 22:54:32 +0000 (22:54 +0000)]
Remove unused variable

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

14 years agoTeach SourceManager's content cache to keep track of whether its
Douglas Gregor [Tue, 16 Mar 2010 22:53:51 +0000 (22:53 +0000)]
Teach SourceManager's content cache to keep track of whether its
buffer was invalid when it was created, and use that bit to always set
the "Invalid" flag according to whether the buffer is invalid. This
ensures that all accesses to an invalid buffer are marked invalid,
improving recovery.

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

14 years agoAudit all Preprocessor::getSpelling() callers, improving failure
Douglas Gregor [Tue, 16 Mar 2010 22:30:13 +0000 (22:30 +0000)]
Audit all Preprocessor::getSpelling() callers, improving failure
recovery for those that need it.

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

14 years agofix copyright & typo
Blaine Garst [Tue, 16 Mar 2010 22:02:16 +0000 (22:02 +0000)]
fix copyright & typo

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

14 years agoForgot the testcases.
John McCall [Tue, 16 Mar 2010 21:50:59 +0000 (21:50 +0000)]
Forgot the testcases.

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

14 years agoImplement -Wshadow. Based on a patch by Mike M.!
John McCall [Tue, 16 Mar 2010 21:48:18 +0000 (21:48 +0000)]
Implement -Wshadow.  Based on a patch by Mike M.!

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

14 years agoupdate link
Chris Lattner [Tue, 16 Mar 2010 21:43:03 +0000 (21:43 +0000)]
update link

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

14 years agoPerform access control for the implicit calls to base and member destructors
John McCall [Tue, 16 Mar 2010 21:39:52 +0000 (21:39 +0000)]
Perform access control for the implicit calls to base and member destructors
that occur in constructors (on the unwind path).

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

14 years agoat least give the Apple ABI a name that reflects Apple in prep for other ABI specs...
Blaine Garst [Tue, 16 Mar 2010 21:22:41 +0000 (21:22 +0000)]
at least give the Apple ABI a name that reflects Apple in prep for other ABI specs that might come along

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

14 years agorev existing doc to account for recent ABI changes
Blaine Garst [Tue, 16 Mar 2010 21:21:07 +0000 (21:21 +0000)]
rev existing doc to account for recent ABI changes

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

14 years agoUpdate get*LineNumber() and get*ColumnNumber() functions to pass the
Douglas Gregor [Tue, 16 Mar 2010 20:53:17 +0000 (20:53 +0000)]
Update get*LineNumber() and get*ColumnNumber() functions to pass the
Invalid bit through; there are no safety-critical callers of these
functions.

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

14 years agoAudit all callers of SourceManager::getCharacterData(); update some of
Douglas Gregor [Tue, 16 Mar 2010 20:46:42 +0000 (20:46 +0000)]
Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure.

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

14 years agoAudit all callers of SourceManager::getBufferData(); fix the one that
Douglas Gregor [Tue, 16 Mar 2010 20:26:15 +0000 (20:26 +0000)]
Audit all callers of SourceManager::getBufferData(); fix the one that
needs better error recovery.

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

14 years agoAudit all getBuffer() callers (for both the FullSourceLoc and
Douglas Gregor [Tue, 16 Mar 2010 20:01:30 +0000 (20:01 +0000)]
Audit all getBuffer() callers (for both the FullSourceLoc and
SourceManager versions), updating those callers that need to recover
gracefully from failure.

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

14 years agoTeach the one caller of SourceManager::getMemoryBufferForFile() to cope with errors
Douglas Gregor [Tue, 16 Mar 2010 19:49:24 +0000 (19:49 +0000)]
Teach the one caller of SourceManager::getMemoryBufferForFile() to cope with errors

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

14 years agoaccept and ignore __gcc_tdiag__ so we don't produce warnings
Chris Lattner [Tue, 16 Mar 2010 19:29:19 +0000 (19:29 +0000)]
accept and ignore __gcc_tdiag__ so we don't produce warnings
building mainline GCC, PR6542

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

14 years agoMake sure we actually override ReadHeaderFileInfo when we meant to
Douglas Gregor [Tue, 16 Mar 2010 19:09:18 +0000 (19:09 +0000)]
Make sure we actually override ReadHeaderFileInfo when we meant to

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

14 years agoDriver: Fix forwarding of -fno-lax-vector-conversions.
Daniel Dunbar [Tue, 16 Mar 2010 16:57:46 +0000 (16:57 +0000)]
Driver: Fix forwarding of -fno-lax-vector-conversions.

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

14 years agoFix header-search problems with precompiled headers, where the
Douglas Gregor [Tue, 16 Mar 2010 16:35:32 +0000 (16:35 +0000)]
Fix header-search problems with precompiled headers, where the
presence or absence of header map arguments when using the precompiled
header would cause Clang to get confused about which headers had
already been included/imported, along with their controlling
macros. The fundamental problem is that the serialization of the
header search information was relying on the UIDs of FileEntry objects
at PCH generation time and PCH load time to be equivalent, which
effectively means that we had to probe the same files in the same
order. Differing header map arguments caused an extra FileEntry
lookup, but it's easy to imagine other minor command-line arguments
triggering this problem.

Header-search information is now encoded along with the
source-location entry for a file, so that we register information
about a file's properties as a header at the same time we create the
FileEntry for that file.

Fixes <rdar://problem/7743243>.

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

14 years agoSwitch another function to StringRef instead of char pointer pairs.
Benjamin Kramer [Tue, 16 Mar 2010 14:48:07 +0000 (14:48 +0000)]
Switch another function to StringRef instead of char pointer pairs.

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

14 years agoLet SourceManager::getBufferData return StringRef instead of a pair of two const...
Benjamin Kramer [Tue, 16 Mar 2010 14:14:31 +0000 (14:14 +0000)]
Let SourceManager::getBufferData return StringRef instead of a pair of two const char*.

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

14 years agoAdd VisitCXXContructExpr logic to the analyzer. This still has not fully worked
Zhongxing Xu [Tue, 16 Mar 2010 13:14:16 +0000 (13:14 +0000)]
Add VisitCXXContructExpr logic to the analyzer. This still has not fully worked
since RemoveDeadBinding mistakenly remove the binding to CXXThisRegion.

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

14 years agoAccess control for implicit calls to copy assignment operators and copy
John McCall [Tue, 16 Mar 2010 06:11:48 +0000 (06:11 +0000)]
Access control for implicit calls to copy assignment operators and copy
constructors from implicitly-defined members.

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

14 years agoDon't consume tokens past the end-of-file in an @interface. Fixes
Douglas Gregor [Tue, 16 Mar 2010 06:04:47 +0000 (06:04 +0000)]
Don't consume tokens past the end-of-file in an @interface. Fixes
<rdar://problem/7735566>.

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

14 years agoPerform access control even for the implicit destructor calls from implicit
John McCall [Tue, 16 Mar 2010 05:36:30 +0000 (05:36 +0000)]
Perform access control even for the implicit destructor calls from implicit
destructor definitions.  Remove some code duplication.

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

14 years agoPerform access control for the implicit base and member destructor calls
John McCall [Tue, 16 Mar 2010 05:22:47 +0000 (05:22 +0000)]
Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.

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

14 years agoIntroduce optional "Invalid" parameters to routines that invoke the
Douglas Gregor [Tue, 16 Mar 2010 05:20:39 +0000 (05:20 +0000)]
Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.

I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.

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

14 years agoUse SourceManager's Diagnostic object for all file-reading errors,
Douglas Gregor [Tue, 16 Mar 2010 00:35:39 +0000 (00:35 +0000)]
Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.

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

14 years agoGive SourceManager a Diagnostic object with which to report errors,
Douglas Gregor [Tue, 16 Mar 2010 00:06:06 +0000 (00:06 +0000)]
Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail.

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

14 years agoAdd some <cstdio> includes to unbreak the buildbots
Douglas Gregor [Mon, 15 Mar 2010 23:33:37 +0000 (23:33 +0000)]
Add some <cstdio> includes to unbreak the buildbots

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

14 years agoAdd remaining sse4.1 intrinsics and builtins.
Eric Christopher [Mon, 15 Mar 2010 23:22:58 +0000 (23:22 +0000)]
Add remaining sse4.1 intrinsics and builtins.

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

14 years agoIntroduce a new BufferResult class to act as the return type of
Douglas Gregor [Mon, 15 Mar 2010 22:54:52 +0000 (22:54 +0000)]
Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).

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

14 years agoMove method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfa...
Ted Kremenek [Mon, 15 Mar 2010 20:30:07 +0000 (20:30 +0000)]
Move method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfaceDecl.
Also change this method to lookup property declarations using DeclContext::lookup().

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

14 years agoChange ObjCCategoryDecl::FindPropertyDeclaration() to lookup
Ted Kremenek [Mon, 15 Mar 2010 20:11:53 +0000 (20:11 +0000)]
Change ObjCCategoryDecl::FindPropertyDeclaration() to lookup
property decls using DeclContext::lookup().

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

14 years agoMake 'findPropertyDecl()' a static method of ObjCPropertyDecl.
Ted Kremenek [Mon, 15 Mar 2010 20:11:46 +0000 (20:11 +0000)]
Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.

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

14 years agoAdd 'expected-note'
Ted Kremenek [Mon, 15 Mar 2010 18:47:29 +0000 (18:47 +0000)]
Add 'expected-note'

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

14 years agoCorrectly determine if the @property has been previously declared. If
Ted Kremenek [Mon, 15 Mar 2010 18:47:25 +0000 (18:47 +0000)]
Correctly determine if the @property has been previously declared.  If
a property has the same name as the ivar it wraps then the old logic
wouldn't find the previous property declaration.

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

14 years agoobjective-c++ must take into account qualifiers when
Fariborz Jahanian [Mon, 15 Mar 2010 18:36:00 +0000 (18:36 +0000)]
objective-c++ must take into account qualifiers when
considering valid objc pointer converions.

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

14 years agoAdd comment to CFG to 'buildCFG()' arguments indicating that scope
Ted Kremenek [Mon, 15 Mar 2010 17:45:13 +0000 (17:45 +0000)]
Add comment to CFG to 'buildCFG()' arguments indicating that scope
support is not fully implemented.

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

14 years agoRename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.
Ted Kremenek [Mon, 15 Mar 2010 17:38:58 +0000 (17:38 +0000)]
Rename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.
(there was a missing 'C').

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

14 years agoRemove useless forward decl.
Kovarththanan Rajaratnam [Mon, 15 Mar 2010 17:31:29 +0000 (17:31 +0000)]
Remove useless forward decl.

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

14 years agoDuring C++ name lookup, use DeclContext::Equals() rather than
Douglas Gregor [Mon, 15 Mar 2010 15:26:48 +0000 (15:26 +0000)]
During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.

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

14 years agoImplement C++ [temp.local]p8, which specifies that a template
Douglas Gregor [Mon, 15 Mar 2010 14:33:29 +0000 (14:33 +0000)]
Implement C++ [temp.local]p8, which specifies that a template
parameter hides a namespace-scope declararion with the same name in an
out-of-line definition of a template. The lookup requires a strange
interleaving of lexical and semantic scopes (go C++), which I have not
yet handled in the typo correction/code completion path.

Fixes PR6594.

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

14 years agoAdd support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.
John McCall [Mon, 15 Mar 2010 10:54:44 +0000 (10:54 +0000)]
Add support for -Wwrite-strings.  Patch by Mike M!  Fixes PR 4804.

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

14 years agoRemember declaration scope qualifiers in the AST. Imposes no memory overhead
John McCall [Mon, 15 Mar 2010 10:12:16 +0000 (10:12 +0000)]
Remember declaration scope qualifiers in the AST.  Imposes no memory overhead
on unqualified declarations.

Patch by Enea Zaffanella!  Minimal adjustments:  allocate the ExtInfo nodes
with the ASTContext and delete them during Destroy().  I audited a bunch of
Destroy methods at the same time, to ensure that the correct teardown was
being done.

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

14 years agoRemember access paths for visible conversion decls.
John McCall [Mon, 15 Mar 2010 09:07:48 +0000 (09:07 +0000)]
Remember access paths for visible conversion decls.

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

14 years agoFix thinko and enable clang build on mingw again (hopefully)
Anton Korobeynikov [Sun, 14 Mar 2010 12:55:35 +0000 (12:55 +0000)]
Fix thinko and enable clang build on mingw again (hopefully)

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

14 years agoAdd EmitString helper method
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 08:35:19 +0000 (08:35 +0000)]
Add EmitString helper method

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

14 years agoUnbreak last commit. This should have been part of r98478.
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 07:55:43 +0000 (07:55 +0000)]
Unbreak last commit. This should have been part of r98478.

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

14 years agoPass file string by reference
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 07:38:15 +0000 (07:38 +0000)]
Pass file string by reference

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

14 years agoPath related cleanup. Remove unnecessary variables.
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 07:15:57 +0000 (07:15 +0000)]
Path related cleanup. Remove unnecessary variables.

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

14 years agoUse makeAbsolute()
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 07:06:50 +0000 (07:06 +0000)]
Use makeAbsolute()

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

14 years agoMove to anonymous namespace
Kovarththanan Rajaratnam [Sun, 14 Mar 2010 06:48:05 +0000 (06:48 +0000)]
Move to anonymous namespace

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

14 years agoFixed copy-and-paste error causing categories to contain the protocols declared on...
David Chisnall [Sat, 13 Mar 2010 22:20:45 +0000 (22:20 +0000)]
Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.

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