]>
granicus.if.org Git - clang/log
Richard Smith [Tue, 22 May 2012 01:41:27 +0000 (01:41 +0000)]
Truthify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 May 2012 00:54:40 +0000 (00:54 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 May 2012 00:52:49 +0000 (00:52 +0000)]
Use Perl prototypes instead of shift.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157228
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 22 May 2012 00:47:53 +0000 (00:47 +0000)]
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
rdar://
11501256
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 May 2012 23:29:01 +0000 (23:29 +0000)]
Add basic delta-debugging script used for reducing analyzer crasher test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157219
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 May 2012 22:43:44 +0000 (22:43 +0000)]
objective-c: provide a useful 'fixit' suggestion when
errornously using commas to separate ObjC message arguments.
// rdar://
11376372
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157216
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 21 May 2012 22:13:23 +0000 (22:13 +0000)]
Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.
Testcase to follow.
Part of rdar://
11457152
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 21 May 2012 22:07:00 +0000 (22:07 +0000)]
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
(ex: float).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 21 May 2012 20:31:27 +0000 (20:31 +0000)]
Function template version of the previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 21 May 2012 20:15:56 +0000 (20:15 +0000)]
Produce a hidden symbol for zed in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct HIDDEN bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
Before we would produce a hidden symbol in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
But adding HIDDEN to the specialization would cause us to produce a default
symbol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157206
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 21 May 2012 20:11:54 +0000 (20:11 +0000)]
[driver] When creating the compiler invocation out of command-line
arguments, force use of clang frontend for the driver.
Fixes rdar://
11356765 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 21 May 2012 19:40:38 +0000 (19:40 +0000)]
Analyzer: Fix PR12905, a crash when encountering a call to a function named "C".
While there clean up indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 21 May 2012 17:48:31 +0000 (17:48 +0000)]
[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error".
Per feedback from John this is useful to have in general.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 May 2012 17:10:28 +0000 (17:10 +0000)]
Remove unused argument in my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 May 2012 17:02:43 +0000 (17:02 +0000)]
objective-c: When default synthesizing readonly IBOutlet properties
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://
11448209
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 21 May 2012 14:22:37 +0000 (14:22 +0000)]
Test and document a difference from gcc in the handling of visibility
attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 21 May 2012 10:42:01 +0000 (10:42 +0000)]
Unpack enums in CodeCompletetionResult.
In theory they should be wide enough even when the enum type is signed, but it
looks like MSVC9 still has problems with it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 May 2012 23:28:41 +0000 (23:28 +0000)]
Teach Clang about the NVPTX backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 May 2012 23:28:36 +0000 (23:28 +0000)]
Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 May 2012 23:28:32 +0000 (23:28 +0000)]
CUDA: the device and host attributes must be inheritable, in order
to deal with NVIDIA's headers. We'll need to think of another way
to handle multiple host/device definitions within the same TU.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157171
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 20 May 2012 22:28:03 +0000 (22:28 +0000)]
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)]
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0. This relies on address
space 0 being a unified address space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 May 2012 14:19:46 +0000 (14:19 +0000)]
Bitpack CodeCompletionResults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 20 May 2012 06:43:46 +0000 (06:43 +0000)]
Fix test for 32-bit hosts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 20 May 2012 01:27:21 +0000 (01:27 +0000)]
Error when using typeid() with -fno-rtti. PR 12888.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 20 May 2012 00:46:05 +0000 (00:46 +0000)]
Zap a bogus assert for delegating constructors. PR12890, part 2.
I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 19 May 2012 23:35:23 +0000 (23:35 +0000)]
Make delegating initializers use a similar codepath to base initializers in dependent contexts. PR12890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 19 May 2012 18:17:17 +0000 (18:17 +0000)]
objective-c: Warn if default synthesizing readonly IBOutlet properties
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://
11448209
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 19 May 2012 17:20:59 +0000 (17:20 +0000)]
Missing line break.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 19 May 2012 17:17:26 +0000 (17:17 +0000)]
Use RecordDecl::field_iterator because D1, D2 are RecordDecls. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 May 2012 16:34:46 +0000 (16:34 +0000)]
Apparently empty names are allowed here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 May 2012 16:03:58 +0000 (16:03 +0000)]
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)]
Inline a trivial clear() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 May 2012 10:43:54 +0000 (10:43 +0000)]
Simplify code, add an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 19 May 2012 01:36:50 +0000 (01:36 +0000)]
Update API usage for llvm DIBuilder changes for rvalue reference
types and ensure we are actually creating the type.
rdar://
11479676
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 19 May 2012 00:22:11 +0000 (00:22 +0000)]
[analyzer] c++11: do not crash on namespace alias
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 19 May 2012 00:22:07 +0000 (00:22 +0000)]
[analyzer] For locations, use isGLValue() instead of isLValue().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Fri, 18 May 2012 23:42:49 +0000 (23:42 +0000)]
Suggest adding 'typename' when it would make the compiler
accept the template argument expression as a type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 18 May 2012 22:47:43 +0000 (22:47 +0000)]
[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 18 May 2012 22:47:40 +0000 (22:47 +0000)]
[analyzer] Malloc checker: remove unnecessary comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 18 May 2012 21:22:49 +0000 (21:22 +0000)]
objc: use "class extension" instead of "continuation class"
to match documentation. // rdar://
11309706
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 18 May 2012 19:32:16 +0000 (19:32 +0000)]
Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 18 May 2012 16:56:52 +0000 (16:56 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 18 May 2012 01:47:00 +0000 (01:47 +0000)]
Centralize the handling of the "attribute declaration must precede definition"
warning. This also makes us warn on tags, which, ironically, is the only case
gcc warns on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 18 May 2012 01:16:10 +0000 (01:16 +0000)]
[analyzer]Malloc: refactor and report use after free by memory
allocating functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 18 May 2012 00:19:25 +0000 (00:19 +0000)]
Another test for r157025 <rdar://problem/
11460990 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 17 May 2012 23:13:29 +0000 (23:13 +0000)]
A selector match between two Objective-C methods does *not* guarantee
that the methods have the same number of parameters, although we
certainly assumed this in many places. Objective-C can be insane
sometimes. Fixes <rdar://problem/
11460990 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 17 May 2012 22:46:56 +0000 (22:46 +0000)]
Remove trailing periods which snuck into a few diagnostic strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 17 May 2012 22:39:14 +0000 (22:39 +0000)]
In the override search for Objective-C methods, protect against ASTs that have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/
11478173 >, a recent regression
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 17 May 2012 21:14:26 +0000 (21:14 +0000)]
Drop the question mark when complaining about a non-existing -Wno- flag.
We're certain that it doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 17 May 2012 20:53:37 +0000 (20:53 +0000)]
Add -mno-implicit-float to the M group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 17 May 2012 18:16:05 +0000 (18:16 +0000)]
[arcmt] Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error.
This is more trouble that it is worth; autoreleasing a value without holding on it
is a valid use-case, we should not "punish" correct code for the minority of
broken/fragile programs that depend on the behavior of -autorelease.
rdar://
9914061
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 17 May 2012 15:45:13 +0000 (15:45 +0000)]
[driver] Reword the warning message for missing value to a joined argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156993
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Thu, 17 May 2012 12:44:05 +0000 (12:44 +0000)]
Added two missing const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 17 May 2012 12:01:52 +0000 (12:01 +0000)]
CXXThisScopeRAII objects aren't free, don't compute one if it's unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 17 May 2012 08:49:14 +0000 (08:49 +0000)]
[tsan] grammar fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 17 May 2012 00:03:16 +0000 (00:03 +0000)]
Use the argument location instead of the format string location when warning
about argument type mismatch.
This gives a nicer diagnostic in cases like
printf(fmt,
i);
where previously the snippet just pointed at 'fmt' (with a note at the
definition of fmt).
It's a wash for cases like
printf("%f",
i);
where previously we snippeted the offending portion of the format string,
but didn't indicate which argument was at fault.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 May 2012 23:49:15 +0000 (23:49 +0000)]
[libclang/AST] When declaring a local class, don't neglect to set the end location
of the DeclStmt node, otherwise libclang will not work for anything inside that
class.
rdar://
10837710
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 May 2012 23:45:12 +0000 (23:45 +0000)]
[driver] Remove obsolete support for -A link option. The standard -A option is
used by the preprocessor. Apple's GCC also supported a -A option for linking.
The ld man page has the following:
-A basefile - Obsolete incremental load format. This option is obsolete.
Nick Kledzik confirms this option is no longer needed/supported.
rdar://
11455614
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 16 May 2012 23:40:17 +0000 (23:40 +0000)]
Recover better from a missing 'typename' in a function template definition.
Disambiguate past such a potential problem, and use the absence of 'typename'
to break ties in favor of a parenthesized thingy being an initializer, if
nothing else in the declaration disambiguates it as declaring a function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156963
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 May 2012 22:28:47 +0000 (22:28 +0000)]
SmallString Visual Studio visualizer by Will Wilson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156959
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 16 May 2012 22:14:14 +0000 (22:14 +0000)]
clang/test/Tooling: Remark as XFAIL again in 5 tests for msvc hosts.
FIXME: JSON doesn't like path separator '\', on Win32 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 16 May 2012 22:06:47 +0000 (22:06 +0000)]
XFAIL this test on MIPS.
Since r156650, clang has stopped emitting byval arguments for MIPS targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 May 2012 22:02:36 +0000 (22:02 +0000)]
Remove unnecessary temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 May 2012 21:19:55 +0000 (21:19 +0000)]
Rename the driver option to -mno-implicit-float, per Eli's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 16 May 2012 21:13:36 +0000 (21:13 +0000)]
Add triples for test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 16 May 2012 20:55:58 +0000 (20:55 +0000)]
Pulls diagnostics for temp file handling into the common diagnostic kinds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 May 2012 20:40:09 +0000 (20:40 +0000)]
[driver] Allow the driver to directly accept the -no-implicit-float option, so that the
generation of implicit floating point instructions can be disable for ARM.
rdar://
11409142
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 16 May 2012 20:29:44 +0000 (20:29 +0000)]
[analyzer] Fix test for PR12206, which was failing on i386.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156941
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 20:04:05 +0000 (20:04 +0000)]
Add _alignof and __builtin_alignof as aliases for __alignof in
Microsoft mode, from Will Wilson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 May 2012 19:42:03 +0000 (19:42 +0000)]
Tweek r156937 a bit so that the suggestions are correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156938
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 May 2012 19:28:02 +0000 (19:28 +0000)]
Warn about -Wno-foo where foo is an unknown warning option. This is helpful
for subtle misspellings such as -Wno-unused-command-line-arguments instead of
-Wno-unused-command-line-argument.
Also fix the diagnostic messages to properly handle -Wno- options. Previously,
the positive version was always emitted (i.e., -Wfoo was emitted for -Wno-foo).
rdar://
11461500
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 May 2012 19:22:47 +0000 (19:22 +0000)]
[libclang] Properly handle @encode() in RecursiveASTVisitor and traverse
its type source info. Fixes indexing references inside @encode().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Wed, 16 May 2012 19:04:59 +0000 (19:04 +0000)]
Move the warnings for extra semi-colons under -Wextra-semi. Also, added
a warning for an extra semi-colon after function definitions. Added logic
so that a block of semi-colons on a line will only get one warning instead
of a warning for each semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 16 May 2012 18:46:25 +0000 (18:46 +0000)]
[analyzer] Revert a regression committed in r156920.
This breaks the build with -triple i386-apple-darwin9.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156932
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 16 May 2012 17:38:04 +0000 (17:38 +0000)]
clang/test/Tooling: Remove XFAIL in 5 tests to unveil the real failure.
FYI, they can pass on Cygwin w/o any tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156930
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 16 May 2012 17:37:56 +0000 (17:37 +0000)]
clang/test/Tooling/clang-check-pwd.cpp: Add "REQUIRES: shell".
This passes on MSYS bash and Cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156929
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 17:01:33 +0000 (17:01 +0000)]
Clean up r156925, so that we only mark the capturing DeclRefExpr of a
lambda as referring to a local in an enclosing scope if we're in the
enclosing scope of the lambda (not it's function call operator). Also,
turn the test into an IR generation test, since that's where the
crashes occurred. Really fixes PR12746 / <rdar://problem/
11465120 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 16:50:20 +0000 (16:50 +0000)]
Fix code generation of variables reference expressions when mixing
blocks and lambdas, based heavily on a patch from Meador Inge. Fixes
PR12746 / <rdar://problem/
11465120 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 16:31:58 +0000 (16:31 +0000)]
Fix ASTReader handling of ImportDecls, from Meador Inge!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 16:11:17 +0000 (16:11 +0000)]
Use a llvm::SmallString rather than std::string for duplicate-case errors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 16 May 2012 16:01:14 +0000 (16:01 +0000)]
[analyzer] Fix RUN lines for old XFAIL tests, one of which actually works.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 16 May 2012 16:01:10 +0000 (16:01 +0000)]
[analyzer] Convert many existing tests to use clang_analyzer_eval.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156920
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 16 May 2012 16:01:07 +0000 (16:01 +0000)]
[analyzer] Introduce clang_analyzer_eval for regression test constraint checks.
The new debug.ExprInspection checker looks for calls to clang_analyzer_eval,
and emits a warning of TRUE, FALSE, or UNKNOWN (or UNDEFINED) based on the
constrained value of its (boolean) argument. It does not modify the analysis
state though the conditions tested can result in branches (e.g. through the
use of short-circuit operators).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 May 2012 12:44:25 +0000 (12:44 +0000)]
StringSwitchify. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 May 2012 12:19:08 +0000 (12:19 +0000)]
Factor sema for attributes unavailable and deprecated into a common function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 16 May 2012 08:19:13 +0000 (08:19 +0000)]
[tsan] fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156912
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 May 2012 08:18:58 +0000 (08:18 +0000)]
Clarify how libstdc++ and other bits of the system toolchain are found
on Linux in the getting started documentation.
Patch by Nathan Ridge.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 16 May 2012 08:14:36 +0000 (08:14 +0000)]
[tsan] first version of ThreadSanitizer docs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 16 May 2012 06:36:00 +0000 (06:36 +0000)]
[tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt into the appropriate place at build time
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 May 2012 05:32:58 +0000 (05:32 +0000)]
Produce more useful 'duplicate case' diagnostics. Fixes PR9243, from Terry Long!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156904
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 May 2012 04:20:04 +0000 (04:20 +0000)]
Include the correct conversion context locations for condition expressions.
This improves the conversion diagnostics (by correctly pointing to the loop
construct for conversions that may've been caused by the contextual conversion
to bool caused by a condition expression) and also causes the NULL conversion
warnings to be correctly suppressed when crossing a macro boundary in such a
context. (previously, since the conversion context location was incorrect, the
suppression could not be performed)
Reported by Nico Weber as feedback to r156826.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 May 2012 02:10:38 +0000 (02:10 +0000)]
Fix the visibility of instantiations of static data members.
Fixes pr12835.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 May 2012 00:50:02 +0000 (00:50 +0000)]
[libclang/AST] Index references of protocols in "@protocol(...)" syntax.
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://
11190837
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 May 2012 00:21:21 +0000 (00:21 +0000)]
[objcmt] Accept char arrays for rewriting to @() syntax.
Part of rdar://
11438360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 15 May 2012 23:12:53 +0000 (23:12 +0000)]
[analyzer] Add a test for dead stores, which uses OpaqueValExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 May 2012 22:59:54 +0000 (22:59 +0000)]
[objcmt] When using NSNumber numberWithInteger:/numberWithUnsignedInteger: be
more liberal in rewriting when the parameter is an enum constant.
Part of rdar://
11438360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 May 2012 22:37:04 +0000 (22:37 +0000)]
objective-c: perform strict type checking on property
type and its accessor type and issue error if types
are incompatible, instead of crashing in IRgen.
// rdar://
1105153
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 15 May 2012 22:31:56 +0000 (22:31 +0000)]
[analyzer] Fix a regression in ObjCUnusedIVars checker.
We can no longer rely on children iterator to visit all the AST
tree children of an expression (OpaqueValueExpr has no children).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 May 2012 22:22:10 +0000 (22:22 +0000)]
[objcmt] Rewrite messages to NSString's stringWithUTF8String:/stringWithCString:
to use the @() boxing syntax.
It will also rewrite uses of stringWithCString:encoding: where the encoding that is
used is NSASCIIStringEncoding or NSUTF8StringEncoding.
rdar://
11438360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156868
91177308 -0d34-0410-b5e6-
96231b3b80d8