]> granicus.if.org Git - clang/log
clang
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

14 years agoRevert 98439. There is a bad race condition in sys::Path::makeUnique on win32.
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

14 years agoAdd missing space.
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

14 years agoGive explicit template instantiations weak ODR linkage. Former
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

14 years agoFix PR6562. If a type is dependent, we don't know if it will have implicit
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

14 years agoMake getTemporaryPath a static member of CIndexer and use it to replace tmpnam calls.
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

14 years agoUse raw_ostream instead of sprintf.
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

14 years agoSimplify code.
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

14 years agoUse SmallString instead of SmallVector
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

14 years agoNo need to call setIdentifierInfo() after LookUpIdentifierInfo() which LookUpIdentifi...
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

14 years agoRe-revert the explicit template instantiation linkage patch. I am beginning to look...
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

14 years agoReinstate patch to turn explicit template instantiations into weak symbols
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

14 years agoImplement several CIndex functions for constructing USRs from C-strings instead of...
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

14 years agoCheck compatibility of vector types using their canonicalizations.
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

14 years agoAllow users to set CPPFLAGS and CXXFLAGS on the make command line.
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

14 years agoUse llvm::SmallVector instead of std::vector.
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

14 years agoFix a rare corner case bug which exposed a serious block API generation
Fariborz Jahanian [Fri, 12 Mar 2010 21:40:43 +0000 (21:40 +0000)]
Fix a rare corner case bug which exposed a serious block API generation
when initialized variable is a byref block variable and is referenced recursively
in the initializer (you guessed it, it is block implementation of
fibonacci number). Fix, on the other hand is trvial, by generating the
API for byref variable before API for its initializer. We will have this
test added to our internal test suite as a clang-style test is not possible
due to very convoluted IR sequence. Fixes radar 7745514.

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

14 years agoIf main file name is empty then use "<unknown>".
Devang Patel [Fri, 12 Mar 2010 21:04:27 +0000 (21:04 +0000)]
If main file name is empty then use "<unknown>".

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

14 years agoPreserve the inherited-default-argument bit through instantiation.
John McCall [Fri, 12 Mar 2010 20:02:47 +0000 (20:02 +0000)]
Preserve the inherited-default-argument bit through instantiation.

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

14 years agoRemember whether a ParmVarDecl was spelled with a default argument or
John McCall [Fri, 12 Mar 2010 18:31:32 +0000 (18:31 +0000)]
Remember whether a ParmVarDecl was spelled with a default argument or
whether it inherited one from a previous declaration.

Patch by Enea Zaffanella!

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

14 years agoFix grammar
Ted Kremenek [Fri, 12 Mar 2010 16:46:36 +0000 (16:46 +0000)]
Fix grammar

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

14 years agoMake IdentifierTable::get(StringRef) "primary" (no functionality change)
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 12:01:19 +0000 (12:01 +0000)]
Make IdentifierTable::get(StringRef) "primary" (no functionality change)

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

14 years agoReintroduce r98340 and r98341 now without copy/paste errors.
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 11:27:37 +0000 (11:27 +0000)]
Reintroduce r98340 and r98341 now without copy/paste errors.

Thanks to Ben for pointing this out.

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

14 years agoBack out r98340 abd r98341
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 11:00:51 +0000 (11:00 +0000)]
Back out r98340 abd r98341

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

14 years agoAdd IdentifierTable::get() overload and start using it
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 10:32:27 +0000 (10:32 +0000)]
Add IdentifierTable::get() overload and start using it

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

14 years agofix PR6584: __SSE3__ not defined with -mss3
Nuno Lopes [Fri, 12 Mar 2010 10:20:09 +0000 (10:20 +0000)]
fix PR6584: __SSE3__ not defined with -mss3

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

14 years agoSwitch parameter order for consistency (no functionality change)
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 10:17:07 +0000 (10:17 +0000)]
Switch parameter order for consistency (no functionality change)

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

14 years agoAdd keywords using StringRef
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 10:14:26 +0000 (10:14 +0000)]
Add keywords using StringRef

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

14 years agoCleanup using StringRef
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 09:33:31 +0000 (09:33 +0000)]
Cleanup using StringRef

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

14 years agoSwitch over IdentifierInfoLookup to StringRef
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 08:23:34 +0000 (08:23 +0000)]
Switch over IdentifierInfoLookup to StringRef

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

14 years agoImprove the unused-value check to look into comma expressions and filter out
John McCall [Fri, 12 Mar 2010 07:11:26 +0000 (07:11 +0000)]
Improve the unused-value check to look into comma expressions and filter out
voids in sub-expressions.  Patch by Mike M!

Fixes PR4806.

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

14 years agoMore this adjustment simplification.
Anders Carlsson [Fri, 12 Mar 2010 05:28:07 +0000 (05:28 +0000)]
More this adjustment simplification.

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

14 years agoRevert the linkage change for explicit template instantiations; something is amiss
Douglas Gregor [Fri, 12 Mar 2010 05:13:59 +0000 (05:13 +0000)]
Revert the linkage change for explicit template instantiations; something is amiss

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

14 years agoRemove OldOffset.
Anders Carlsson [Fri, 12 Mar 2010 05:02:01 +0000 (05:02 +0000)]
Remove OldOffset.

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

14 years agoRemove debug output.
Anders Carlsson [Fri, 12 Mar 2010 04:55:20 +0000 (04:55 +0000)]
Remove debug output.

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

14 years agoBegin simplifying handling of thunks.
Anders Carlsson [Fri, 12 Mar 2010 04:54:20 +0000 (04:54 +0000)]
Begin simplifying handling of thunks.

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

14 years agoGive explicit template instantiations weak linkage (but don't defer
Douglas Gregor [Fri, 12 Mar 2010 04:49:06 +0000 (04:49 +0000)]
Give explicit template instantiations weak linkage (but don't defer
them). Fixes PR6578.

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

14 years agoExtend the builtin syntax to allow address-space qualifiers on pointers and
John McCall [Fri, 12 Mar 2010 04:21:28 +0000 (04:21 +0000)]
Extend the builtin syntax to allow address-space qualifiers on pointers and
references.  Based on a patch by Arnaud de Grandmaison!

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

14 years agoSplit Sema::ActOnProperty() into two recursive functions to clearly separate
Ted Kremenek [Fri, 12 Mar 2010 02:31:10 +0000 (02:31 +0000)]
Split Sema::ActOnProperty() into two recursive functions to clearly separate
the handling of class extensions from other cases.

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

14 years agoAdd SSE4 packed integer comparisons and corresponding intrinsics.
Eric Christopher [Fri, 12 Mar 2010 01:22:33 +0000 (01:22 +0000)]
Add SSE4 packed integer comparisons and corresponding intrinsics.

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

14 years agoAdd an extra test to this test-case.
John McCall [Fri, 12 Mar 2010 01:20:21 +0000 (01:20 +0000)]
Add an extra test to this test-case.

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

14 years agoImplement basic support for friend types and functions in non-dependent
John McCall [Fri, 12 Mar 2010 01:19:31 +0000 (01:19 +0000)]
Implement basic support for friend types and functions in non-dependent
contexts.

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

14 years agoFix 80 col violations.
Ted Kremenek [Fri, 12 Mar 2010 00:49:00 +0000 (00:49 +0000)]
Fix 80 col violations.

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

14 years agoMove 'ActOn' methods to the beginning of the file
Ted Kremenek [Fri, 12 Mar 2010 00:46:40 +0000 (00:46 +0000)]
Move 'ActOn' methods to the beginning of the file
so we can clearly see the parser entry points.

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

14 years agoUpdate CMake build.
Ted Kremenek [Fri, 12 Mar 2010 00:38:40 +0000 (00:38 +0000)]
Update CMake build.

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

14 years agoSplit Sema logic for ObjC @property and @synthesize into
Ted Kremenek [Fri, 12 Mar 2010 00:38:38 +0000 (00:38 +0000)]
Split Sema logic for ObjC @property and @synthesize into
a separate file.

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

14 years agoInteger array extraction for sse4.1.
Eric Christopher [Thu, 11 Mar 2010 23:50:18 +0000 (23:50 +0000)]
Integer array extraction for sse4.1.

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

14 years agoAdd packed integer array insertion.
Eric Christopher [Thu, 11 Mar 2010 23:36:29 +0000 (23:36 +0000)]
Add packed integer array insertion.

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

14 years agoKeep track of Record context to ensure that record elements are properly nested in...
Devang Patel [Thu, 11 Mar 2010 20:01:48 +0000 (20:01 +0000)]
Keep track of Record context to ensure that record elements are properly nested in debug info.

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

14 years agoFor ivars created using @synthesize, set their DeclContext to be
Ted Kremenek [Thu, 11 Mar 2010 19:44:54 +0000 (19:44 +0000)]
For ivars created using @synthesize, set their DeclContext to be
the @implementation (instead of the @interface) and actually add
the ivar to the DeclContext (which we weren't doing before).

This allows us to simplify ASTContext::CollectNonClassIvars() by
removing ASTContext::CollectProtocolSynthesizedIvars().  Now all
ivars can be found by either inspecting the ObjCInterfaceDecl and
its companion ObjCImplementationDecl.

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

14 years agoWarn about comparing an unsigned expression with 0 in tautological ways.
John McCall [Thu, 11 Mar 2010 19:43:18 +0000 (19:43 +0000)]
Warn about comparing an unsigned expression with 0 in tautological ways.
Patch by mikem!

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

14 years agoRemember the PR number.
John McCall [Thu, 11 Mar 2010 19:33:57 +0000 (19:33 +0000)]
Remember the PR number.

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

14 years agoImplement -Wmissing-field-initializers. Patch by mikem!
John McCall [Thu, 11 Mar 2010 19:32:38 +0000 (19:32 +0000)]
Implement -Wmissing-field-initializers.  Patch by mikem!

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

14 years agoUse -emit-llvm-only, to avoid leaving a temp around.
Daniel Dunbar [Thu, 11 Mar 2010 18:23:02 +0000 (18:23 +0000)]
Use -emit-llvm-only, to avoid leaving a temp around.

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

14 years agoAdd tentative support for accessing local variables with
Fariborz Jahanian [Thu, 11 Mar 2010 18:20:03 +0000 (18:20 +0000)]
Add tentative support for accessing local variables with
external linkage (static, extern, etc.) in blocks in
rewriter. wip.

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