]>
granicus.if.org Git - clang/log
David Blaikie [Wed, 6 Jun 2012 20:45:41 +0000 (20:45 +0000)]
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 6 Jun 2012 20:15:08 +0000 (20:15 +0000)]
Remove the last dead private member in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158100
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 6 Jun 2012 18:52:13 +0000 (18:52 +0000)]
Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 6 Jun 2012 18:43:20 +0000 (18:43 +0000)]
Escape \n and \r in doxycomment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 6 Jun 2012 17:51:31 +0000 (17:51 +0000)]
Documents linking requirements for libtooling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 6 Jun 2012 17:32:50 +0000 (17:32 +0000)]
Remove unused private member variables found by clang's new -Wunused-private-field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 6 Jun 2012 17:25:21 +0000 (17:25 +0000)]
Add pedantic warning -Wempty-translation-unit (C11 6.9p1).
In standard C since C89, a 'translation-unit' is syntactically defined to have
at least one "external-declaration", which is either a decl or a function
definition. In Clang the latter gives us a declaration as well.
The tricky bit about this warning is that our predefines can contain external
declarations (__builtin_va_list and the 128-bit integer types). Therefore our
AST parser now makes sure we have at least one declaration that doesn't come
from the predefines buffer.
Also, remove bogus warning about empty source files. This doesn't catch source
files that only contain comments, and never fired anyway because of our
predefines.
PR12665 and <rdar://problem/
9165548 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 6 Jun 2012 12:00:10 +0000 (12:00 +0000)]
Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
Only 1 minor code change was necessary: can't use cdecl as variable name anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 6 Jun 2012 08:32:04 +0000 (08:32 +0000)]
Introduce -Wunused-private-field. If enabled, this warning detects
unused private fields of classes that are fully defined in the current
translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Jun 2012 06:25:37 +0000 (06:25 +0000)]
Disable path pruning for UndefResultChecker. It turns out we usually want to see more of the path
to discover how a value was used uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 5 Jun 2012 23:44:51 +0000 (23:44 +0000)]
A non-explicit constructor template with a second parameter that is a
parameter pack is a converting constructor. Fixes PR13003.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Jun 2012 22:00:52 +0000 (22:00 +0000)]
PlistDiagnostics: force the ranges for control-flow edges to be single locations, forcing
adjacent edges to have compatible ranges. This simplifies the layout logic for some clients.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 5 Jun 2012 21:14:46 +0000 (21:14 +0000)]
objective-c: merge deprecated/unavailable attributes to
the overriding deprecated/unavailable method.
// rdar://
11475360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 5 Jun 2012 20:16:30 +0000 (20:16 +0000)]
Fixes the refactoring library test in VS2010.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 5 Jun 2012 19:40:46 +0000 (19:40 +0000)]
Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/
11592208 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 5 Jun 2012 18:16:22 +0000 (18:16 +0000)]
Reapply "Only emit debug information for methods that are user defined, there's"
As the failing testcase has been fixed.
This reverts commit
0637f407e6ee7fdccde17fbf9a5fcc4853187b3e .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 5 Jun 2012 16:18:26 +0000 (16:18 +0000)]
RecursiveASTVisitor: add ability to visit implicit declarations. Patch by
James Dennett!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 5 Jun 2012 13:06:56 +0000 (13:06 +0000)]
Mips: Define __mips_hard_float macro additional to __mips_single_float
when single float ABI is selected.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157996
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 5 Jun 2012 06:10:39 +0000 (06:10 +0000)]
Revert "Only emit debug information for methods that are user defined, there's"
This reverts r157970, which was not passing on
clang-x86_64-darwin10-nobootstrap-RA
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 5 Jun 2012 00:15:06 +0000 (00:15 +0000)]
Only emit debug information for methods that are user defined, there's
not much reason to emit for constructors and destructors that aren't
user defined.
rdar://
11593099
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 23:52:23 +0000 (23:52 +0000)]
Teach format string checking about compile-time CFString constants.
Within the guts of CheckFormatHandler, the IsObjCLiteral flag was being used in
two ways: to see if null bytes were allowed, and to see if the '%@' specifier
is allowed.* The former usage has been changed to an explicit test and the
latter pushed down to CheckPrintfHandler and renamed ObjCContext, since it
applies to CFStrings as well.
* This also changes how wide chars are interpreted; in OS X Foundation, the
wide character type is 'unichar', a typedef for short, rather than wchar_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 22:49:02 +0000 (22:49 +0000)]
Make suggestions for mismatched enum arguments to printf/scanf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 22:48:57 +0000 (22:48 +0000)]
Teach printf/scanf about enums with fixed underlying types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 4 Jun 2012 22:46:59 +0000 (22:46 +0000)]
PR13022: cope with parenthesized function types in MS name mangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 4 Jun 2012 22:27:30 +0000 (22:27 +0000)]
Add a warning for when an array-to-pointer decay is performed on an array
temporary or an array subobject of a class temporary, and the resulting value
is used to initialize a pointer which outlives the temporary. Such a pointer
is always left dangling after the initialization completes and the array's
lifetime ends.
In order to detect this situation, this change also adds an
LValueClassification of LV_ArrayTemporary for temporaries of array type which
aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++
(T){...} expressions, when T is an array type. Previously we treated the former
as a generic prvalue and the latter as a class temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 4 Jun 2012 21:59:02 +0000 (21:59 +0000)]
[analyzer] Fixup for r157950. Unbreak the bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 4 Jun 2012 21:56:14 +0000 (21:56 +0000)]
Document how fixits on errors and warnings must behave.
Review and wording tweaks by Richard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Jun 2012 21:32:12 +0000 (21:32 +0000)]
Add a testcase for C++11 union support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157952
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 4 Jun 2012 21:23:26 +0000 (21:23 +0000)]
[objcmt] Don't migrate to subscripting syntax if the required methods have not
been declared on NSArray/NSDictionary.
rdar://
11581975
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 4 Jun 2012 21:03:31 +0000 (21:03 +0000)]
[analyzer] Fix a diagnostics bug which lead to a crash on the buildbot.
This bug was triggered by r157851. It only happens in the case where we
don't perform optimal diagnostic pruning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 4 Jun 2012 20:07:46 +0000 (20:07 +0000)]
Fixes some test cases that should have come along with r157943.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 4 Jun 2012 19:16:34 +0000 (19:16 +0000)]
objective-c: Handle more warning cases for when
message receiver is 'weak' property.
// rdar://
10225276
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 4 Jun 2012 19:02:59 +0000 (19:02 +0000)]
Fixed a problem related to resolution of built-in headers in case a path of tool's binary contains sym-links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 4 Jun 2012 18:57:41 +0000 (18:57 +0000)]
Removing the lambda extension warning concerning single return statements, as it no longer applies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 17:21:14 +0000 (17:21 +0000)]
[diagtool] Properly order libraries in Makefile for buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 16:57:53 +0000 (16:57 +0000)]
Remove AST and Parse from Driver's dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 4 Jun 2012 16:57:50 +0000 (16:57 +0000)]
[diagtool] Re-add show-enabled, minimizing the code pulled in from Frontend.
Now correctly builds with both GNU make and CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 4 Jun 2012 11:15:05 +0000 (11:15 +0000)]
Require -pie when linking with ASan on Android.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 4 Jun 2012 10:19:34 +0000 (10:19 +0000)]
Test the '__thread' before 'static' warning.
Also fix the '__thread' before 'extern' case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 4 Jun 2012 03:42:47 +0000 (03:42 +0000)]
Add fma3 intrinsic header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 4 Jun 2012 00:15:09 +0000 (00:15 +0000)]
When adding built-in operator candidates for overload resolution
involving 'restrict', place restrict on the pointer type rather than
on the pointee type. Also make sure that we gather restrict from the
pointer type. Fixes PR12854 and the major part of PR11093.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 3 Jun 2012 22:23:42 +0000 (22:23 +0000)]
Make disabling SSE levels also disable AVX and FMA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 3 Jun 2012 21:56:22 +0000 (21:56 +0000)]
Make AES and PCLMUL features imply SSE2 as that's needed to get the right types defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 3 Jun 2012 21:49:41 +0000 (21:49 +0000)]
Add __POPCNT__ to test cases for corei7 and corei7-avx
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 3 Jun 2012 21:46:30 +0000 (21:46 +0000)]
Add fma feature flag for Intel FMA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 3 Jun 2012 10:12:04 +0000 (10:12 +0000)]
Upgrade test for the fma4->fma intrinsic change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 3 Jun 2012 07:07:00 +0000 (07:07 +0000)]
Improve fixit for comparison operator on lhs of bitwise operator.
Before:
test.cc:2:18: note: place parentheses around the == expression to silence this warning
if (0 == flags & 0xdd)
^
( )
Now:
test.cc:2:18: note: place parentheses around the == expression to silence this warning
if (0 == flags & 0xdd)
^
( )
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 2 Jun 2012 18:20:16 +0000 (18:20 +0000)]
Follow-up on the test of r157892
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 2 Jun 2012 18:08:09 +0000 (18:08 +0000)]
Initialize the non-target-dependent fields of the Preprocessor in its constructor
so we can destroy it even if it was constructed with "DelayInitialization = true",
and we didn't end up calling Preprocessor::Initialize.
Fixes crashes in rdar://
11558355
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157892
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 2 Jun 2012 15:34:26 +0000 (15:34 +0000)]
Revert r157819, "#ifdef out a broken test on win32"
FYI, LLVM_ON_WIN32 is useless.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157890
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 2 Jun 2012 15:34:21 +0000 (15:34 +0000)]
ToolInvocation::mapVirtualFile(): Tweak for Win32. Handle the key as native path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 2 Jun 2012 15:06:29 +0000 (15:06 +0000)]
MIPS: Factor out code selects the float ABI as determined by -msoft-float,
-mhard-float, and -mfloat-abi= to the new function getMipsFloatABI. That
simplifies reuse of this code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157888
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 2 Jun 2012 10:20:41 +0000 (10:20 +0000)]
Fix typos found by http://github.com/lyda/misspell-check
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157886
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Sat, 2 Jun 2012 01:01:07 +0000 (01:01 +0000)]
Implementation of a "soft opt-in" option for -Wimplicit-fallthrough diagnostics: -Wimplicit-fallthrough-per-method
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 2 Jun 2012 00:40:52 +0000 (00:40 +0000)]
[analyzer] Rely on canBeInlined utility instead of checking CallExpr
explicitly.
This will make it easier to add inlining support to more expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 1 Jun 2012 23:48:44 +0000 (23:48 +0000)]
[analyzer] Fix a spurious undef value warning.
When we timeout or exceed a max number of blocks within an inlined
function, we retry with no inlining starting from a node right before
the CallEnter node. We assume the state of that node is the state of the
program before we start evaluating the call. However, the node pruning
removes this node as unimportant.
Teach the node pruning to keep the predecessors of the call enter nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 1 Jun 2012 23:48:40 +0000 (23:48 +0000)]
[analyzer] Fix lack of coverage after empty inlined function.
We should not stop exploring the path after we return from an empty
function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Jun 2012 23:04:04 +0000 (23:04 +0000)]
Disable diagnosic path pruning for ReturnUndefChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 22:23:02 +0000 (22:23 +0000)]
[diagtool] Pull show-enabled back out for now.
Need to figure out how to get Frontend's warning parsing without bringing
in all of Frontend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 22:02:18 +0000 (22:02 +0000)]
[diagtool] Unbork Makefile build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Jun 2012 21:51:15 +0000 (21:51 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157844
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 21:50:37 +0000 (21:50 +0000)]
[diagtool] Appease buildbot by adding llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157843
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 21:23:17 +0000 (21:23 +0000)]
[diagtool] Add 'show-enabled', which displays which warnings are enabled.
show-enabled uses the command line you give it to build a CompilerInstance,
so any flags you pass will be processed as if running clang proper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 21:23:13 +0000 (21:23 +0000)]
[diagtool] The driver skips two arguments, not one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Jun 2012 20:04:04 +0000 (20:04 +0000)]
static analyzer: add inlining support for directly called blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Fri, 1 Jun 2012 18:11:16 +0000 (18:11 +0000)]
Don't allow multiple correction candidates that have the same identifier
but different nested name specifiers to quietly clobber each other so
only one remains if they do not refer to the same NamedDecl. Fixes
PR12951.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 1 Jun 2012 16:48:55 +0000 (16:48 +0000)]
#ifdef out a broken test on win32
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 16:24:43 +0000 (16:24 +0000)]
[analyzer] SATestBuild should execute SVN updates even if Verbose is off.
Also, re-use glob results when looking for failure logs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 16:24:38 +0000 (16:24 +0000)]
[analyzer] Fix SATestAdd to work with SATestBuild.
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 1 Jun 2012 14:50:43 +0000 (14:50 +0000)]
Added a test for ToolInvocation::mapVirtualFile method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 1 Jun 2012 00:22:57 +0000 (00:22 +0000)]
Support C++11 enum forward declarations.
Part of rdar://
11570854
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 1 Jun 2012 00:10:47 +0000 (00:10 +0000)]
[arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.
rdar://
11569198
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 1 Jun 2012 00:02:08 +0000 (00:02 +0000)]
Anonymous union members within a struct are now properly handled as an unevaluated field in C++11 mode. This fixes PR12866.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Thu, 31 May 2012 23:32:58 +0000 (23:32 +0000)]
In TypoCorrectionConsumer, BestResults to CorrectionResults to lessen
the confusion among all of the uses of Best* in relation to the set of
possible typo correction results. Also add a method to return the set of
typo corrections that have the single best edit distance--it returns the
second half of the first pair in TypoEditDistanceMap (with
getBestEditDistance already returning the first half).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157781
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 31 May 2012 23:18:32 +0000 (23:18 +0000)]
objc: properties of NSObject attribute must
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar://
11569860
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 31 May 2012 21:24:58 +0000 (21:24 +0000)]
[analyzer] Fix BugType memory leak in IdempotentOperationChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 31 May 2012 19:27:30 +0000 (19:27 +0000)]
Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 31 May 2012 18:07:55 +0000 (18:07 +0000)]
[analyzer] Cleanup for r157721.
We should lock the number of elements after the initial parsing is
complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can
trigger lazy pch deserialization resulting in more calls to
HandleTopLevelDecl and appending to the LocalTUDecls list. We should
ignore those.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 31 May 2012 17:58:43 +0000 (17:58 +0000)]
Fix an object lifetime issue in clang/Tooling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 May 2012 06:03:17 +0000 (06:03 +0000)]
Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly
improved the pruning heuristics. The current heuristics are pretty good, but they make diagnostics
for uninitialized variables warnings particularly useless in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 31 May 2012 05:18:48 +0000 (05:18 +0000)]
Add builtin for pclmulqdq instruction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 30 May 2012 23:55:51 +0000 (23:55 +0000)]
Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 23:14:52 +0000 (23:14 +0000)]
Change wording of 'memcpy' type mismatch warning and remove fixit.
As per comments following r157659.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 23:14:48 +0000 (23:14 +0000)]
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
Follow up in r155693, r155680.
Prevents a hard to reproduce crash with the following stack trace:
3 libsystem_c.dylib 0x00007ff55a835050 _sigtramp +
18446744029881443184
4 clang 0x0000000106218e97 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 519
5 clang 0x0000000105cf3002 clang::ParseAST(clang::Sema&,
bool, bool) + 690
6 clang 0x00000001059a41d8
clang::ASTFrontendAction::ExecuteAction() + 312
7 clang 0x00000001059a3df7 clang::FrontendAction::Execute()
+ 231
8 clang 0x00000001059b0ecc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860
9 clang 0x000000010595e451
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961
10 clang 0x0000000105947f29 cc1_main(char const**, char
const**, char const*, void*) + 969
11 clang 0x0000000105958259 main + 473
12 clang 0x0000000105947b34 start + 52
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 30 May 2012 22:41:32 +0000 (22:41 +0000)]
Add a test for '%@' suggestion for classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 30 May 2012 21:53:13 +0000 (21:53 +0000)]
Suggest '%@' for Objective-C objects in ObjC format strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157716
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 30 May 2012 20:45:14 +0000 (20:45 +0000)]
Disable -Wunique-enum for anonymous enums.
This is a large class of false positives where anonymous enums are used to
declare constants (see Clang's Diagnostics.h for example). A small number of
true positives could probably be found in this bucket by still warning if the
anonymous enum is used in a declarator (enum { ... } x;) but so far we don't
believe this to be a source of significant benefit so I haven't bothered to
preserve those cases.
General offline review/acknowledgment by rtrieu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 30 May 2012 18:18:29 +0000 (18:18 +0000)]
TableGen: Remove extraneous '\' at EOL in generated tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 May 2012 17:33:54 +0000 (17:33 +0000)]
objective-c: revert r157407. It broke a project
and reported as PR12959. // rdar://
11499742
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 30 May 2012 16:04:29 +0000 (16:04 +0000)]
Adds a toString method to Replacement, which helps debugging.
Adds missing header guards to Refactoring.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 30 May 2012 12:10:28 +0000 (12:10 +0000)]
Fixed a memory leak in clang/Tooling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 May 2012 09:56:26 +0000 (09:56 +0000)]
supply a simple-minded testcase for r156813, to check whether the embedded montavista gcc toolchain is recognized
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 30 May 2012 06:55:10 +0000 (06:55 +0000)]
Clang docs update: list command-line flags that control the size of generated debug information. Reviewed by chandlerc@ and echristo@.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 05:54:54 +0000 (05:54 +0000)]
SSE4A should not imply LZCNT and POPCNT. FMA4 should imply SSE4A. Add missing break at the end of btver1 feature list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 04:49:49 +0000 (04:49 +0000)]
Update FIXME. ABM is already covered by LZCNT and POPCNT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 04:45:24 +0000 (04:45 +0000)]
Mark extrqi and insertqi immediate arguments as being ICE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 30 May 2012 04:30:08 +0000 (04:30 +0000)]
Test commit - Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 30 May 2012 01:14:28 +0000 (01:14 +0000)]
Remove some extra braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Wed, 30 May 2012 01:01:11 +0000 (01:01 +0000)]
Add new -Wunique-enum which will warn on enums which all elements have the
same value and were initialized with literals. Clang will warn on code like
this:
enum A {
FIRST = 1,
SECOND = 1
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 00:34:21 +0000 (00:34 +0000)]
Add fixits for memory access warnings.
Also, do not display the builtin name and macro expansion when the
function is a builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157659
91177308 -0d34-0410-b5e6-
96231b3b80d8