]> granicus.if.org Git - clang/log
clang
12 years ago[analyzer] Relax the cmp criteria for analyzer reports.
Anna Zaks [Sat, 5 Nov 2011 05:20:56 +0000 (05:20 +0000)]
[analyzer] Relax the cmp criteria for analyzer reports.

Until we find out a way to easily find out what changed by looking at the logs.

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

12 years ago[analyzer] Add the list of available checkers to the website.
Anna Zaks [Sat, 5 Nov 2011 05:20:54 +0000 (05:20 +0000)]
[analyzer] Add the list of available checkers to the website.

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

12 years ago[analyzer] There should be a space between "expect" and "only"
Anna Zaks [Sat, 5 Nov 2011 05:20:51 +0000 (05:20 +0000)]
[analyzer] There should be a space between "expect" and "only"

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

12 years ago[analyzer] Add support for testing with individual preprocessed files.
Anna Zaks [Sat, 5 Nov 2011 05:20:48 +0000 (05:20 +0000)]
[analyzer] Add support for testing with individual preprocessed files.

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

12 years agoFix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
Argyrios Kyrtzidis [Sat, 5 Nov 2011 04:03:43 +0000 (04:03 +0000)]
Fix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
switch statement, not the while loop).

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

12 years ago[libclang] For "c-index-test -index-file", print out the names of the callbacks.
Argyrios Kyrtzidis [Sat, 5 Nov 2011 04:03:35 +0000 (04:03 +0000)]
[libclang] For "c-index-test -index-file", print out the names of the callbacks.

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

12 years agoOn Linux, enable the gold plugin if we are using LTO.
Peter Collingbourne [Sat, 5 Nov 2011 03:47:53 +0000 (03:47 +0000)]
On Linux, enable the gold plugin if we are using LTO.

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

12 years agoCorrect the grammar for __builtin_astype.
Peter Collingbourne [Sat, 5 Nov 2011 03:47:48 +0000 (03:47 +0000)]
Correct the grammar for __builtin_astype.

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

12 years agoserialized diagnostics: include FixIt information in serialized diagnostics.
Ted Kremenek [Sat, 5 Nov 2011 03:34:23 +0000 (03:34 +0000)]
serialized diagnostics: include FixIt information in serialized diagnostics.

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

12 years agoMove definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.
Akira Hatanaka [Sat, 5 Nov 2011 01:48:34 +0000 (01:48 +0000)]
Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.

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

12 years agoFix test so that it XFAILs consistently.
Eli Friedman [Sat, 5 Nov 2011 00:49:47 +0000 (00:49 +0000)]
Fix test so that it XFAILs consistently.

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

12 years agoFix MSVC build.
Michael J. Spencer [Sat, 5 Nov 2011 00:46:46 +0000 (00:46 +0000)]
Fix MSVC build.

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

12 years agoFix one last place where we weren't writing into a string literal consistently.
Eli Friedman [Sat, 5 Nov 2011 00:41:04 +0000 (00:41 +0000)]
Fix one last place where we weren't writing into a string literal consistently.

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

12 years agoFix incorrect format string in debug output.
Eli Friedman [Sat, 5 Nov 2011 00:38:30 +0000 (00:38 +0000)]
Fix incorrect format string in debug output.

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

12 years agoTeach LiveVariables to look through OpaqueValueExprs for extending Stmt liveness.
Ted Kremenek [Sat, 5 Nov 2011 00:26:53 +0000 (00:26 +0000)]
Teach LiveVariables to look through OpaqueValueExprs for extending Stmt liveness.

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

12 years agoPer discussion with John McCall, don't add OpaqueValueExprs to the CFG.
Ted Kremenek [Sat, 5 Nov 2011 00:10:15 +0000 (00:10 +0000)]
Per discussion with John McCall, don't add OpaqueValueExprs to the CFG.

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

12 years agoserialized diagnostics: pull emission of filenames into diagnostic block.
Ted Kremenek [Sat, 5 Nov 2011 00:10:11 +0000 (00:10 +0000)]
serialized diagnostics: pull emission of filenames into diagnostic block.

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

12 years agoserialized diagnostics: pull emission of diagnostic flag string into diagnostics...
Ted Kremenek [Sat, 5 Nov 2011 00:10:07 +0000 (00:10 +0000)]
serialized diagnostics: pull emission of diagnostic flag string into diagnostics block.

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

12 years agoSerialized diagnostics: pull category name serialization into diagnostic blocks....
Ted Kremenek [Sat, 5 Nov 2011 00:10:04 +0000 (00:10 +0000)]
Serialized diagnostics: pull category name serialization into diagnostic blocks.  The goal is to remove BLOCK_STRINGS so that the bitcode file can potentially be streamed.

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

12 years agoserialized diagnostics: emit source ranges.
Ted Kremenek [Sat, 5 Nov 2011 00:10:01 +0000 (00:10 +0000)]
serialized diagnostics: emit source ranges.

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

12 years agoMove definition of record/block IDs for serialized diagnostics to public header.
Ted Kremenek [Sat, 5 Nov 2011 00:09:57 +0000 (00:09 +0000)]
Move definition of record/block IDs for serialized diagnostics to public header.

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

12 years agoSerialized diagnostics: encode a 24 bit version number as part of the "magic number...
Ted Kremenek [Sat, 5 Nov 2011 00:09:53 +0000 (00:09 +0000)]
Serialized diagnostics: encode a 24 bit version number as part of the "magic number" of serialized diagnostics.

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

12 years agoserialized diagnostics: unique warning strings when emitting serialized diagnostics.
Ted Kremenek [Sat, 5 Nov 2011 00:09:50 +0000 (00:09 +0000)]
serialized diagnostics: unique warning strings when emitting serialized diagnostics.

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

12 years agoSerialized diagnostics: serialize "notes" as sub diagnostics of warnings and errors.
Ted Kremenek [Sat, 5 Nov 2011 00:09:47 +0000 (00:09 +0000)]
Serialized diagnostics: serialize "notes" as sub diagnostics of warnings and errors.

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

12 years agoAlso include file modification time and size in output of SerializedDiagnosticPrinter.
Ted Kremenek [Sat, 5 Nov 2011 00:09:43 +0000 (00:09 +0000)]
Also include file modification time and size in output of SerializedDiagnosticPrinter.

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

12 years ago[arcmt] Fix an assertion hit in rdar://10336125; a bit too complicated to reduce.
Argyrios Kyrtzidis [Sat, 5 Nov 2011 00:02:26 +0000 (00:02 +0000)]
[arcmt] Fix an assertion hit in rdar://10336125; a bit too complicated to reduce.

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

12 years agoBegin the migration of header search logic to the driver, starting with
Chandler Carruth [Fri, 4 Nov 2011 23:49:05 +0000 (23:49 +0000)]
Begin the migration of header search logic to the driver, starting with
Windows. There are still FIXMEs and lots of problems with this code.
Some of them will be addressed shortly by my follow-up patches, but most
are going to wait until we isolate this code and can fix it properly.
This version should be no worse than what we had before.

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

12 years agoSwitch the C++ include interface in the ToolChain to use the same naming
Chandler Carruth [Fri, 4 Nov 2011 23:49:01 +0000 (23:49 +0000)]
Switch the C++ include interface in the ToolChain to use the same naming
as the system include interface before I start adding implementations of
it to individual ToolChain implementations.

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

12 years agoCheck for invalid after calling getSLocEntry, for safety.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 23:43:06 +0000 (23:43 +0000)]
Check for invalid after calling getSLocEntry, for safety.

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

12 years ago[arcmt] In GC, error out when there is a call that returns a pointer to
Argyrios Kyrtzidis [Fri, 4 Nov 2011 23:43:03 +0000 (23:43 +0000)]
[arcmt] In GC, error out when there is a call that returns a pointer to
GC managed non-objc object memory.

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

12 years agoIn ARC, when applying an ownership to a non-objc pointer, instead of ignoring it
Argyrios Kyrtzidis [Fri, 4 Nov 2011 20:37:24 +0000 (20:37 +0000)]
In ARC, when applying an ownership to a non-objc pointer, instead of ignoring it
create an attributed type with same type as the original type.

We effectively retain the source info that an ownership attribute was present but the attribute
is ignored by not modifying the type that it was applied to.

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

12 years agoEnable -flimit-debug-info by default. Now, clang lazily emits debug info for structs...
Devang Patel [Fri, 4 Nov 2011 20:05:58 +0000 (20:05 +0000)]
Enable -flimit-debug-info by default. Now, clang lazily emits debug info for structs. Original behavior can be restored using -fno-limit-debug-info.

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

12 years ago[driver] Don't blindly accept all -g options.
Chad Rosier [Fri, 4 Nov 2011 19:28:44 +0000 (19:28 +0000)]
[driver] Don't blindly accept all -g options.
rdar://10383444

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

12 years agoRevert r143551. It is causing g++.dg/template/crash52.C test failure.
Devang Patel [Fri, 4 Nov 2011 18:52:43 +0000 (18:52 +0000)]
Revert r143551. It is causing g++.dg/template/crash52.C test failure.

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

12 years agoobjc: fixed enum type is supported in objc mode.
Fariborz Jahanian [Fri, 4 Nov 2011 18:51:24 +0000 (18:51 +0000)]
objc: fixed enum type is supported in objc mode.
Fixes a bug where enumerator type is not this
fixed type. // rdar://10381507

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

12 years agoClean up C++11 constant expression testing.
Richard Smith [Fri, 4 Nov 2011 18:32:57 +0000 (18:32 +0000)]
Clean up C++11 constant expression testing.

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

12 years agoAdd new test.
Devang Patel [Fri, 4 Nov 2011 17:12:03 +0000 (17:12 +0000)]
Add new test.

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

12 years agoAdd new test.
Devang Patel [Fri, 4 Nov 2011 16:57:26 +0000 (16:57 +0000)]
Add new test.

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

12 years ago[arcmt] For GC, cleanup and turn -finalize to -dealloc.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:22 +0000 (15:58 +0000)]
[arcmt] For GC, cleanup and turn -finalize to -dealloc.

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

12 years ago[arcmt] In GC, error for use of CFMakeCollectable because it will leak the
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:17 +0000 (15:58 +0000)]
[arcmt] In GC, error for use of CFMakeCollectable because it will leak the
object that it receives in ARC.

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

12 years agoIn C++ keep unavailable function calls in the AST, like in C/ObjC.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:13 +0000 (15:58 +0000)]
In C++ keep unavailable function calls in the AST, like in C/ObjC.

This allows the migrator to visit and fix them.

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

12 years ago[arcmt] In GC, transform NSMakeCollectable to CFBridgingRelease.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:08 +0000 (15:58 +0000)]
[arcmt] In GC, transform NSMakeCollectable to CFBridgingRelease.

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

12 years agoRemove unused variables.
Benjamin Kramer [Fri, 4 Nov 2011 15:05:51 +0000 (15:05 +0000)]
Remove unused variables.

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

12 years agoSink the strange '-stdlib=...' flag handling into the C++ include
Chandler Carruth [Fri, 4 Nov 2011 07:43:33 +0000 (07:43 +0000)]
Sink the strange '-stdlib=...' flag handling into the C++ include
handling logic of the generic ToolChain. This flag, despite its name,
has *nothing* to do with the GCC flag '-nostdlib' that relates
(exclusively) to the linking behavior. It is a most unfortunate name in
that regard...

It is used to tell InitHeaderSearch.cpp *which* set of C++ standard
library header search paths to use -- those for libstdc++ from GCC's
installation, or those from a libc++ installation. As this logic is
hoisted out of the Frontend, and into the Driver as part of this
ToolChain, the generic method will be overridden for the platform, where
it can implement this logic directly. As such, hiding the CC1 option
passing in the generic space is a natural fit despite the odd naming.

Also, expand on the comments to clarify whats going on, and tidy up the
Tools.cpp code now that its simpler.

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

12 years agoSink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
Chandler Carruth [Fri, 4 Nov 2011 07:34:47 +0000 (07:34 +0000)]
Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
implementation in the driver. This cleans up the signature and semantics
of the include flag adding component of the toolchain. Another step to
ready it for holding all the InitHeaderSearch logic.

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

12 years agoAdd a FIXME to cleanup the CPATH handling. It's currently burried with
Chandler Carruth [Fri, 4 Nov 2011 07:12:58 +0000 (07:12 +0000)]
Add a FIXME to cleanup the CPATH handling. It's currently burried with
the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the
driver profitably, removing more noise from the driver -> frontend
communication.

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

12 years agoAdd a system include management interface to the toolchain, and call it
Chandler Carruth [Fri, 4 Nov 2011 07:12:53 +0000 (07:12 +0000)]
Add a system include management interface to the toolchain, and call it
and the C++ include management routine from the proper place when
forming preprocessor options in the driver. This is the first step to
teaching the driver to manage all of the header search paths. Currently,
these methods remain just stubs in the abstract toolchain. Subsequent
patches will flesh them out with implementations for various toolchains
based on the current code in InitHeaderSearch.cpp.

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

12 years agoConstant expression evaluation: refactor to start the groundwork for coping with
Richard Smith [Fri, 4 Nov 2011 05:33:44 +0000 (05:33 +0000)]
Constant expression evaluation: refactor to start the groundwork for coping with
initializations which refer indirectly to elements of the object being
initialized.

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

12 years agoConstant expression evaluation: track the manner in which an lvalue was written,
Richard Smith [Fri, 4 Nov 2011 02:25:55 +0000 (02:25 +0000)]
Constant expression evaluation: track the manner in which an lvalue was written,
to allow us to implement the C++11 rule that a non-active union member can't be
read, and use it to implement subobject access for string literals.

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

12 years agoConstant expression evaluation: although we don't know whether a literal will
Richard Smith [Fri, 4 Nov 2011 01:10:57 +0000 (01:10 +0000)]
Constant expression evaluation: although we don't know whether a literal will
be at the same address as another object, we do know it won't alias a null
pointer.

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

12 years agoIn the AST dump, add a space between the type and value for CharacterLiteral.
Richard Trieu [Thu, 3 Nov 2011 23:56:23 +0000 (23:56 +0000)]
In the AST dump, add a space between the type and value for CharacterLiteral.

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

12 years agoUse a single integer type for a sub-doubleword part of a byval structure.
Akira Hatanaka [Thu, 3 Nov 2011 23:31:00 +0000 (23:31 +0000)]
Use a single integer type for a sub-doubleword part of a byval structure.

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

12 years agoFix alignment on alloca's for parameters using ABIArgInfo::Expand.
Eli Friedman [Thu, 3 Nov 2011 21:39:02 +0000 (21:39 +0000)]
Fix alignment on alloca's for parameters using ABIArgInfo::Expand.

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

12 years agoParse the warning options twice. The first pass sets diagnostic state, while
Chad Rosier [Thu, 3 Nov 2011 21:23:39 +0000 (21:23 +0000)]
Parse the warning options twice.  The first pass sets diagnostic state, while
the second pass reports warnings/errors.  This has the effect that we follow
the more canonical "last option wins" paradigm when there are conflicting
options.
rdar://10383776

Previously, we parsed the warning options in order.  This caused non-intuitive
behavior:

1) clang test.c -Wnosuchwarning -Wno-unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
[0 warning generated.]

2) clang test.c -Wnosuchwarning -Werror=unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]

3) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
After:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
2 warnings generated.

4) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wno-unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]

After:
[0 warning generated.]

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

12 years agoAfter resetting the diagnostic state, set the number of warning occurring in the...
Argyrios Kyrtzidis [Thu, 3 Nov 2011 20:57:33 +0000 (20:57 +0000)]
After resetting the diagnostic state, set the number of warning occurring in the preamble.

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

12 years agoFix the alignment on scalar parameter variables so that it matches what the AST think...
Eli Friedman [Thu, 3 Nov 2011 20:31:28 +0000 (20:31 +0000)]
Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be.  Per report on cfe-dev.

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

12 years ago[libclang] Fix crash when a #pragma diagnostic is included in the preamble.
Argyrios Kyrtzidis [Thu, 3 Nov 2011 20:28:19 +0000 (20:28 +0000)]
[libclang] Fix crash when a #pragma diagnostic is included in the preamble.

A PCH file keeps track of #pragma diagnostics state; when loading the preamble, they conflicted
with the #pragma diagnostic state already present in the DiagnosticsEngine object due to
parsing the preamble.

Fix this by clearing the state of the DiagnosticsEngine object.
Fixes rdar://10363572 && http://llvm.org/PR11254.

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

12 years agoForce test to use the non-fragile ABI
Douglas Gregor [Thu, 3 Nov 2011 19:58:50 +0000 (19:58 +0000)]
Force test to use the non-fragile ABI

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

12 years ago[libclang] Move CursorVisitor to its own header.
Argyrios Kyrtzidis [Thu, 3 Nov 2011 19:02:34 +0000 (19:02 +0000)]
[libclang] Move CursorVisitor to its own header.

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

12 years ago[libclang] Make sure pointing inside the #include of the fields will return the struct.
Argyrios Kyrtzidis [Thu, 3 Nov 2011 19:02:30 +0000 (19:02 +0000)]
[libclang] Make sure pointing inside the #include of the fields will return the struct.

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

12 years ago[libclang] Use CursorVisitor::Visit instead of invoking the visitor directly.
Argyrios Kyrtzidis [Thu, 3 Nov 2011 19:02:28 +0000 (19:02 +0000)]
[libclang] Use CursorVisitor::Visit instead of invoking the visitor directly.

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

12 years ago[libclang] Add a test for "targeting" a field inside an #include that only
Argyrios Kyrtzidis [Thu, 3 Nov 2011 19:01:07 +0000 (19:01 +0000)]
[libclang] Add a test for "targeting" a field inside an #include that only
contains fields.

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

12 years agoExtend IsSimplyAccessible to check for Objective-C instance variable
Douglas Gregor [Thu, 3 Nov 2011 19:00:24 +0000 (19:00 +0000)]
Extend IsSimplyAccessible to check for Objective-C instance variable
accessibility. Fixes <rdar://problem/3727335>.

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

12 years agoFix grammaro
Douglas Gregor [Thu, 3 Nov 2011 18:33:01 +0000 (18:33 +0000)]
Fix grammaro

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

12 years agoTeach the ASTImporter to import DefinitionData bits.
Douglas Gregor [Thu, 3 Nov 2011 18:07:07 +0000 (18:07 +0000)]
Teach the ASTImporter to import DefinitionData bits.

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

12 years agoClass can't be null in this context
Douglas Gregor [Thu, 3 Nov 2011 17:41:55 +0000 (17:41 +0000)]
Class can't be null in this context

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

12 years agoRefactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than...
Douglas Gregor [Thu, 3 Nov 2011 16:51:37 +0000 (16:51 +0000)]
Refactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than a class

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

12 years agoWhen we're checking a friend function template in an out-of-line class
Douglas Gregor [Thu, 3 Nov 2011 16:37:14 +0000 (16:37 +0000)]
When we're checking a friend function template in an out-of-line class
definition, we may not have a scope corresponding to the namespace
where that friend function template actually lives. Work around this
issue by faking up a scope with the appropriate DeclContext.

This is a bit of a hack, but it fixes <rdar://problem/10204947>.

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

12 years ago[libclang] Add missing return in clang_getExpansionLocation that resulted in that...
Argyrios Kyrtzidis [Thu, 3 Nov 2011 02:20:36 +0000 (02:20 +0000)]
[libclang] Add missing return in clang_getExpansionLocation that resulted in that function
always returning a null file/line/column.

Also add at least one use of clang_getExpansionLocation inside c-index-test that would have
made the tests to catch that.

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

12 years ago[libclang] Add infrastructure to be able to only deserialize decls in a file region and
Argyrios Kyrtzidis [Thu, 3 Nov 2011 02:20:32 +0000 (02:20 +0000)]
[libclang] Add infrastructure to be able to only deserialize decls in a file region and
use it for clang_getCursor.

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

12 years ago[libclang] For c-index-test disable caching of code completion results if
Argyrios Kyrtzidis [Thu, 3 Nov 2011 02:20:25 +0000 (02:20 +0000)]
[libclang] For c-index-test disable caching of code completion results if
the CINDEXTEST_COMPLETION_NO_CACHING environment variable is present.

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

12 years agoDo not add "byval" attribute to records with non-trivial copy constructors
Jan Wen Voung [Thu, 3 Nov 2011 00:59:44 +0000 (00:59 +0000)]
Do not add "byval" attribute to records with non-trivial copy constructors
and destructors in the DefaultABIInfo.

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

12 years agoAdd a printing policy flag to suppress printing "<anonymous>::" prior
Douglas Gregor [Thu, 3 Nov 2011 00:16:13 +0000 (00:16 +0000)]
Add a printing policy flag to suppress printing "<anonymous>::" prior
to types. Enable this flag for code completion, where knowing whether
something is in an anonymous or inline namespace is actually not
useful, since you don't have to type it anyway. Fixes
<rdar://problem/10208818>.

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

12 years agoSet MinABIStackAlignInBytes to 8 if ABI is N32/64.
Akira Hatanaka [Thu, 3 Nov 2011 00:05:50 +0000 (00:05 +0000)]
Set MinABIStackAlignInBytes to 8 if ABI is N32/64.

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

12 years agoConvert the type of a structure passed by value if it has double precision
Akira Hatanaka [Wed, 2 Nov 2011 23:54:49 +0000 (23:54 +0000)]
Convert the type of a structure passed by value if it has double precision
fields in order to ease handling of such structures in backend.

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

12 years agoTest code completion for constructor initializers within the class
Douglas Gregor [Wed, 2 Nov 2011 23:39:56 +0000 (23:39 +0000)]
Test code completion for constructor initializers within the class
definition. This already worked; <rdar://problem/10208871>.

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

12 years agoReturn function results whose size is smaller than 128-bits in registers if ABI
Akira Hatanaka [Wed, 2 Nov 2011 23:14:57 +0000 (23:14 +0000)]
Return function results whose size is smaller than 128-bits in registers if ABI
is N32/64.

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

12 years agoUse native endianness for writing out character escapes to the result buffer for...
Eli Friedman [Wed, 2 Nov 2011 23:06:23 +0000 (23:06 +0000)]
Use native endianness for writing out character escapes to the result buffer for string literal parsing.  No functional change on little-endian architectures; should fix test failures on PPC.

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

12 years agoDon't build member initializers for zero-length or incomplete arrays,
Douglas Gregor [Wed, 2 Nov 2011 23:04:16 +0000 (23:04 +0000)]
Don't build member initializers for zero-length or incomplete arrays,
and don't try to destroy them, either. Fixes
<rdar://problem/10228639>.

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

12 years agoback out changes in r143399 and r143475.
Fariborz Jahanian [Wed, 2 Nov 2011 22:53:43 +0000 (22:53 +0000)]
back out changes in r143399 and r143475.
rvale-references are captured by reference
in blocks. // rdar://9971124.

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

12 years agoDon't encourage bug reports to the Clang mailing list. We have a bug
Douglas Gregor [Wed, 2 Nov 2011 22:49:47 +0000 (22:49 +0000)]
Don't encourage bug reports to the Clang mailing list. We have a bug
report link for that.

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

12 years agoIn addition to dumping preprocessed source, dump a script with the command line
Chad Rosier [Wed, 2 Nov 2011 21:29:05 +0000 (21:29 +0000)]
In addition to dumping preprocessed source, dump a script with the command line
arguments that caused clang to crash.
rdar://8314451

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

12 years agoFix various minor issues find via unreachable code warnings, from
Douglas Gregor [Wed, 2 Nov 2011 20:52:01 +0000 (20:52 +0000)]
Fix various minor issues find via unreachable code warnings, from
Ahmed Charles!

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

12 years ago[analyzer] Tweak the test script
Anna Zaks [Wed, 2 Nov 2011 20:46:50 +0000 (20:46 +0000)]
[analyzer] Tweak the test script

Rename the pre_run_static_analyzer script into cleanup_run_static_analyzer
and use it to clean up after the reference build - which is done as part of
adding a new project to the system.

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

12 years agoAdd the newest Gentoo GCC version based on the reported installed
Chandler Carruth [Wed, 2 Nov 2011 20:09:56 +0000 (20:09 +0000)]
Add the newest Gentoo GCC version based on the reported installed
version in PR11298.

I hear-by apologize for adding yet more code to this monstrosity.

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

12 years ago[analyzer] Start writing Checker Developer Manual.
Anna Zaks [Wed, 2 Nov 2011 17:49:20 +0000 (17:49 +0000)]
[analyzer] Start writing Checker Developer Manual.

So far added the skeleton + several more or less complete sections:
Getting Started
Idea for a Checker
AST Visitors
Useful Commands/Debugging Hints

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

12 years agoDrastically simplify the mapping from the declaration corresponding to
Douglas Gregor [Wed, 2 Nov 2011 17:38:53 +0000 (17:38 +0000)]
Drastically simplify the mapping from the declaration corresponding to
the injected-class-name of a class (or class template) to the
declaration that results from substituting the given template
arguments. Previously, we would actually perform a substitution into
the injected-class-name type and then retrieve the resulting
declaration. However, in certain, rare circumstances involving
deeply-nested member templates, we would get the wrong substitution
arguments.

This new approach just matches up the declaration with a declaration
that's part of the current context (or one of its parents), which will
either be an instantiation (during template instantiation) or the
declaration itself (during the definition of the template). This is
both more efficient (we're avoiding a substitution) and more correct
(we can't get the template arguments wrong in the member-template
case).

Fixes <rdar://problem/9676205>.

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

12 years agoUse StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the...
Douglas Gregor [Wed, 2 Nov 2011 17:26:05 +0000 (17:26 +0000)]
Use StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the expression, so that it works for non-UTF8 strings.

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

12 years agoFixing some dead links. Patch by Jean-Daniel Dupas!
David Blaikie [Wed, 2 Nov 2011 15:13:40 +0000 (15:13 +0000)]
Fixing some dead links. Patch by Jean-Daniel Dupas!

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

12 years agoRemove virtually empty file.
Benjamin Kramer [Wed, 2 Nov 2011 12:04:24 +0000 (12:04 +0000)]
Remove virtually empty file.

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

12 years agoAdd colors to the C++11 status page.
Michael J. Spencer [Wed, 2 Nov 2011 06:29:37 +0000 (06:29 +0000)]
Add colors to the C++11 status page.

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

12 years agoInvoke the Darwin assembler with -g instead of --gdwarf2.
Bob Wilson [Wed, 2 Nov 2011 05:10:45 +0000 (05:10 +0000)]
Invoke the Darwin assembler with -g instead of --gdwarf2.

The -g and --gdwarf2 options are currently synonyms to the Darwin assembler.
But clang itself does not recognize --gdwarf2, so if we want to experiment
with using clang, with its integrated assembler, to replace the default
assembler, it is necessary to use -g.  <rdar://problem/10349486>

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

12 years agoUpdate the CMake build for clang-tblgen to reflect that it directly
Chandler Carruth [Wed, 2 Nov 2011 05:04:43 +0000 (05:04 +0000)]
Update the CMake build for clang-tblgen to reflect that it directly
depends on the Support library rather than relying on TableGen's
transitive dependency.

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

12 years agoCheck for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.
Bob Wilson [Wed, 2 Nov 2011 04:51:36 +0000 (04:51 +0000)]
Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.

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

12 years agoAdd an option to emulate the strange Apple gcc behavior of #pragma pack.
Eli Friedman [Wed, 2 Nov 2011 01:53:16 +0000 (01:53 +0000)]
Add an option to emulate the strange Apple gcc behavior of #pragma pack.

<rdar://problem/10374763>

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

12 years agoobjc: warn if a readonly property has a setter attribute too.
Fariborz Jahanian [Tue, 1 Nov 2011 23:02:16 +0000 (23:02 +0000)]
objc: warn if a readonly property has a setter attribute too.
// rdar://10357768

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

12 years ago[analyzer] Make sink attribute part of the node profile.
Anna Zaks [Tue, 1 Nov 2011 22:41:19 +0000 (22:41 +0000)]
[analyzer] Make sink attribute part of the node profile.

This prevents caching out on nodes with different sink flag.
(This is a cleaner fix for radar://10376675).

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

12 years ago[analyzer] Fix PR11282 - an assert in markAsSink
Anna Zaks [Tue, 1 Nov 2011 22:41:14 +0000 (22:41 +0000)]
[analyzer] Fix PR11282 - an assert in markAsSink

This is another fallout from the refactoring. We were
calling MarkAsSink on a cached out node.
(Fixes radar://10376675)

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

12 years ago[analyzer] Make sure the child builder use temporary destination sets
Anna Zaks [Tue, 1 Nov 2011 22:41:09 +0000 (22:41 +0000)]
[analyzer] Make sure the child builder use temporary destination sets

The parent and child builders should not share node sets.

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

12 years ago[analyzer] BranchNodeBuilder should not generate autotransitions.
Anna Zaks [Tue, 1 Nov 2011 22:41:06 +0000 (22:41 +0000)]
[analyzer] BranchNodeBuilder should not generate autotransitions.

This fixes radar://10367606

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