]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Benjamin Kramer [Sat, 13 Mar 2010 21:22:49 +0000 (21:22 +0000)]
Revert 98439. There is a bad race condition in sys::Path::makeUnique on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Mar 2010 20:14:52 +0000 (20:14 +0000)]
Add missing space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 13 Mar 2010 18:23:07 +0000 (18:23 +0000)]
Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Mar 2010 18:12:56 +0000 (18:12 +0000)]
Fix PR6562. If a type is dependent, we don't know if it will have implicit
destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Mar 2010 13:05:20 +0000 (13:05 +0000)]
Make getTemporaryPath a static member of CIndexer and use it to replace tmpnam calls.
This fixes linker warnings on linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Mar 2010 12:06:51 +0000 (12:06 +0000)]
Use raw_ostream instead of sprintf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Mar 2010 11:34:41 +0000 (11:34 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 13 Mar 2010 10:17:05 +0000 (10:17 +0000)]
Use SmallString instead of SmallVector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 13 Mar 2010 08:53:33 +0000 (08:53 +0000)]
No need to call setIdentifierInfo() after LookUpIdentifierInfo() which LookUpIdentifierInfo() will automatically do
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 13 Mar 2010 03:49:57 +0000 (03:49 +0000)]
Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 13 Mar 2010 03:14:19 +0000 (03:14 +0000)]
Reinstate patch to turn explicit template instantiations into weak symbols
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 13 Mar 2010 02:50:34 +0000 (02:50 +0000)]
Implement several CIndex functions for constructing USRs from C-strings instead of AST elements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98421
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 12 Mar 2010 23:14:13 +0000 (23:14 +0000)]
Check compatibility of vector types using their canonicalizations.
Fixes an assertion arising C overload analysis, but really I can't imagine
that this wouldn't cause a thousand other uncaught failures.
Fixes PR6600.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98400
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 12 Mar 2010 22:55:16 +0000 (22:55 +0000)]
Allow users to set CPPFLAGS and CXXFLAGS on the make command line.
Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Mar 2010 22:22:36 +0000 (22:22 +0000)]
Use llvm::SmallVector instead of std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98397
91177308 -0d34-0410-b5e6-
96231b3b80d8