]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Tue, 12 Apr 2011 16:34:14 +0000 (16:34 +0000)]
Fix a regression where the initializer implements
the initialized's protocol and yet clang warns.
objective-c issue, // rdar://
9267196
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 Apr 2011 10:38:03 +0000 (10:38 +0000)]
Fix AST serialization of reference-to-reference types. This previously caused
a crash when deserializing the AST for this:
typedef char (&R);
extern R &r;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Apr 2011 05:12:39 +0000 (05:12 +0000)]
static analyzer: invalidate by-ref arguments passed to constructors in a 'new' expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129349
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Apr 2011 03:49:37 +0000 (03:49 +0000)]
Fix bug in SimpleSValBuilder where '--' pointer arithmetic was treated like '++' pointer arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 12 Apr 2011 02:47:21 +0000 (02:47 +0000)]
Don't suggest dynamic_cast or typeid as code completion results when
RTTI is disabled. Similarly, don't suggest throw or try as code
completion results when C++ exceptions are disabled. Fixes
<rdar://problem/
9193560 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129346
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 01:46:54 +0000 (01:46 +0000)]
Template static data members can have weak_odr linkage, not just
weak linkage. Also, fix a problem where global weak variables
with non-trivial initializers were getting guard variables, or at
least were checking for them and then crashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129342
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 01:15:45 +0000 (01:15 +0000)]
Whoops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 12 Apr 2011 01:02:45 +0000 (01:02 +0000)]
Objective-C++: The global namespace is an associated namespace of an
Objective-C pointer type. Fixes <rdar://problem/
9142559 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129339
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 01:01:22 +0000 (01:01 +0000)]
Ignore indirect field declarations. Fixes PR9570.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129337
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 00:59:32 +0000 (00:59 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129336
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 00:57:12 +0000 (00:57 +0000)]
This test works now; enable it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Apr 2011 00:44:31 +0000 (00:44 +0000)]
RegionStoreManager::invalidateRegions: treat classes the same as structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129333
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 12 Apr 2011 00:42:48 +0000 (00:42 +0000)]
After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Apr 2011 00:28:12 +0000 (00:28 +0000)]
Teach GRState::getSValAsScalarOrLoc() about C++ references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 11 Apr 2011 22:22:05 +0000 (22:22 +0000)]
C++ static analysis: also invalidate fields of objects that are the callees in C++ method calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 11 Apr 2011 21:26:35 +0000 (21:26 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129301
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 11 Apr 2011 21:17:02 +0000 (21:17 +0000)]
Fixup more objc rwriter bug having to do with
rewriting of blocks which have objective-c
stuff which need be rewritten as well. // rdar://
9254348
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Apr 2011 21:15:37 +0000 (21:15 +0000)]
fix the path to ld.so for darwin/ppc, resolving PR9677. Patch
by Jeremy Huddleston!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 14:13:40 +0000 (14:13 +0000)]
If there's an invoke destination, we should use invoke instead of call when calling the __cxa_bad_typeid function. Fixes PR7400.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129273
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 11 Apr 2011 07:02:50 +0000 (07:02 +0000)]
More __unknown_anytype work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 02:03:26 +0000 (02:03 +0000)]
Remove CK_DynamicToNull.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 01:45:29 +0000 (01:45 +0000)]
When we know that a dynamic_cast always returns null, we can make
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast
exception.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 01:43:55 +0000 (01:43 +0000)]
Add CXXDynamicCastExpr::isAlwaysNull() which will be replacing the cast kind I added.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 00:46:40 +0000 (00:46 +0000)]
Clean up CodeGenFunction::EmitDynamicCast. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Apr 2011 00:30:07 +0000 (00:30 +0000)]
Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 11 Apr 2011 00:23:45 +0000 (00:23 +0000)]
PR9669: implement correct checking for [dcl.init.string]p2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Apr 2011 23:15:15 +0000 (23:15 +0000)]
Remove the CodeGenCXX/dyncast.cpp test; it isn't really super useful to match on huge chunks of LLVM output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Apr 2011 20:33:22 +0000 (20:33 +0000)]
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.
For example:
struct A {
virtual ~A();
};
struct B final : A { };
struct C { };
bool f(B* b) {
return dynamic_cast<C*>(b);
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 10 Apr 2011 19:13:55 +0000 (19:13 +0000)]
Simplify calling CheckPlaceholderExpr, converge on it in a few places,
and move a vector-splat check to follow l-value conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Apr 2011 18:20:53 +0000 (18:20 +0000)]
Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Apr 2011 18:00:32 +0000 (18:00 +0000)]
Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Apr 2011 17:42:45 +0000 (17:42 +0000)]
Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129250
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 10 Apr 2011 16:17:31 +0000 (16:17 +0000)]
Reflect rename on LLVM cmake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 10 Apr 2011 08:36:24 +0000 (08:36 +0000)]
Enhance the diagnostic for literal float -> int conversions to suggest
rewriting the literal when the value is integral. It is not uncommon to
see code written as:
const int kBigNumber = 42e5;
Without any real awareness that this is no longer an ICE. The note helps
automate and ease the process of fixing code that violates the warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 10 Apr 2011 04:58:30 +0000 (04:58 +0000)]
Refactor 129240 to merge the old default argument into the new parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 10 Apr 2011 04:44:11 +0000 (04:44 +0000)]
PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.
While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 10 Apr 2011 03:03:52 +0000 (03:03 +0000)]
MSVC accepts that default parameters be redefined for member functions
of template class. The new value is ignored.
This fixes 1 error when parsing MSVC 2010 header files with clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 10 Apr 2011 02:29:27 +0000 (02:29 +0000)]
libclang output name is now libclang. This solves a name collision
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129239
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 9 Apr 2011 22:50:59 +0000 (22:50 +0000)]
Fix a bunch of major problems with __unknown_anytype and properly test
for them. The only major missing feature is references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Apr 2011 19:54:33 +0000 (19:54 +0000)]
Make sure we or together the overflow flags of the multiply and add, so the
check is triggered appropriately. Reported on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lenny Maiorani [Sat, 9 Apr 2011 15:12:58 +0000 (15:12 +0000)]
strcat() and strncat() model additions to CStringChecker.
Validates inputs are not NULL, checks for overlapping strings, concatenates the strings checking for buffer overflow, sets the length of the destination string to the sum of the s1 length and the s2 length, binds the return value to the s1 value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Sat, 9 Apr 2011 13:34:05 +0000 (13:34 +0000)]
refactor flags for TokenKinds.def
Make KEYALL a combination of all other flags instead
of its own separate flag. Also rewrite the enum
definitions in hex instead of decimal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Sat, 9 Apr 2011 13:31:59 +0000 (13:31 +0000)]
refactor -ccc-gcc-name code
Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.
This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Apr 2011 08:18:08 +0000 (08:18 +0000)]
PR8369: make __attribute((regparm(0))) work correctly. Original patch by
pageexec@freemail.hu, tweaks by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 9 Apr 2011 07:48:17 +0000 (07:48 +0000)]
Clean up the bool conversion warning. Group it with other conversion
warnings, and make its text appropriate for constant bool expressions
other than 'false'. This should finish off PR9612.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 9 Apr 2011 07:32:05 +0000 (07:32 +0000)]
Add support for warning on general null pointer expressions of boolean
type rather than just the literal 'false'. This begins fixing PR9612,
but the message is now wrong. WIP, the cleanup of the messaging is next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Apr 2011 07:11:53 +0000 (07:11 +0000)]
fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Apr 2011 07:09:31 +0000 (07:09 +0000)]
accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,
per PR9577
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129201
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Apr 2011 03:57:26 +0000 (03:57 +0000)]
add a __sync_swap builtin to fill out the rest of the __sync builtins.
Patch by Dave Zarzycki!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Sat, 9 Apr 2011 01:30:02 +0000 (01:30 +0000)]
Convert the PointerWidthInBytes variable in EmitMemberPointer() to CharUnits
to eliminate a divide-by-8. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Sat, 9 Apr 2011 01:09:56 +0000 (01:09 +0000)]
Eliminate a divide-by-8 in BuildVMIClassTypeInfo() by using CharUnits for
the base offset. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 9 Apr 2011 00:53:03 +0000 (00:53 +0000)]
Remove a pair of unused diagnostic messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 9 Apr 2011 00:25:15 +0000 (00:25 +0000)]
Apply explicit braces to avoid ambiguous 'else' [-Wparentheses]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 9 Apr 2011 00:01:04 +0000 (00:01 +0000)]
Eat the UTF-8 BOM at the beginning of a file since it's ignored anyhow.
Nom Nom Nom.
Patch by Anton Korobeynikov!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Apr 2011 23:54:05 +0000 (23:54 +0000)]
complete documentation of flags, patch by nobled
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 8 Apr 2011 23:48:29 +0000 (23:48 +0000)]
Fixes a rewrting bug of a property-dot syntax expression inside
a block. First part of // rdar://
9254348
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Apr 2011 23:35:25 +0000 (23:35 +0000)]
Properly traverse a ObjCMethodDecl in RecursiveASTVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Apr 2011 22:58:43 +0000 (22:58 +0000)]
typo fix + expand
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Apr 2011 22:42:35 +0000 (22:42 +0000)]
Start overhauling static analyzer support for C++ constructors. The inlining support isn't complete, and needs
to be reworked to model CallEnter/CallExit (just like all other calls). For now, treat constructors mostly
like other function calls, making the analysis of C++ code just a little more useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 8 Apr 2011 22:34:21 +0000 (22:34 +0000)]
Minor format fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 8 Apr 2011 22:18:01 +0000 (22:18 +0000)]
Document -ftrap-function= option
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 8 Apr 2011 21:56:52 +0000 (21:56 +0000)]
Do not use zero as an upper bound for unbounded array because upper bound zero also indicates one element array.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 8 Apr 2011 21:37:45 +0000 (21:37 +0000)]
Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 8 Apr 2011 18:47:41 +0000 (18:47 +0000)]
Add -mtrap_function=<> option. rdar://
9257465
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129145
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Wiegley [Fri, 8 Apr 2011 18:41:53 +0000 (18:41 +0000)]
Use ExprResult& instead of Expr *& in Sema
This patch authored by Eric Niebler.
Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.
This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 8 Apr 2011 18:25:29 +0000 (18:25 +0000)]
Warn for any kind of initialization if initializer does not
implement lhs's protocols. // rdar://
9091389 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Apr 2011 18:06:54 +0000 (18:06 +0000)]
fix a typo, patch by PaX team.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 8 Apr 2011 06:47:15 +0000 (06:47 +0000)]
Switch 'is possibly uninitialized' to 'may be uninitialized' based on
Chris's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 8 Apr 2011 06:33:38 +0000 (06:33 +0000)]
Now that the analyzer is distinguishing between uninitialized uses that
definitely have a path leading to them, and possibly have a path leading
to them; reflect that distinction in the warning text emitted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 20:41:03 +0000 (20:41 +0000)]
Driver: Don't attempt to forward some Clang-only options to cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 20:19:21 +0000 (20:19 +0000)]
Frontend/CC_LOG_DIAGNOSTICS: Fix thinko and open diag log in append mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Apr 2011 20:02:56 +0000 (20:02 +0000)]
Teach -Wuninitialized to not warn about variables declared in C++ catch statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 19:05:06 +0000 (19:05 +0000)]
Fronted/CC_LOG_DIAGNOSTICS: Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:59:02 +0000 (18:59 +0000)]
Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:51:54 +0000 (18:51 +0000)]
Fronted/CC_LOG_DIAGNOSTICS: Output main file name, and add support for
outputting dwarf-debug-flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:44:15 +0000 (18:44 +0000)]
Fronted/CC_LOG_DIAGNOSTICS: Tweak output form to be plist chunks, and don't
output missing data.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:37:34 +0000 (18:37 +0000)]
Frontend: Continue flushing out LogDiagnosticPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:31:10 +0000 (18:31 +0000)]
Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS to
it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:24:12 +0000 (18:24 +0000)]
ChainedDiagnosticClient: Fix a bug where chained diagnostic clients wouldn't
accurately track warning/error counts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:11:14 +0000 (18:11 +0000)]
Frontend: Sketch support for -diagnostic-log-file, which still doesn't do anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 7 Apr 2011 18:10:12 +0000 (18:10 +0000)]
Enhance the Rewriter.
-Allow removing a line completely if it ends up empty
-Provide more control on what should be removed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 7 Apr 2011 18:10:07 +0000 (18:10 +0000)]
Add FullSourceLoc::BeforeThanCompare. a comparison function class, useful for sorting FullSourceLocs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Apr 2011 18:01:20 +0000 (18:01 +0000)]
Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 7 Apr 2011 12:37:09 +0000 (12:37 +0000)]
[Reapply r128776, modified so that it does not break debug info.]
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Thu, 7 Apr 2011 09:26:19 +0000 (09:26 +0000)]
In C++ the argument of logical not should always be bool. Added missing implicit cast for scalars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129066
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 7 Apr 2011 08:22:57 +0000 (08:22 +0000)]
Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 7 Apr 2011 01:22:42 +0000 (01:22 +0000)]
[Reapply r128773. This is not the source of the issues Devang was seeing
with debug info.]
Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 7 Apr 2011 00:59:42 +0000 (00:59 +0000)]
[Reapply r128771. It wasn't the source of the issues Devang saw with debug
info.]
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 7 Apr 2011 00:55:01 +0000 (00:55 +0000)]
Reapply r128770. It's not the cause of the issues Devang saw with debug info.
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129043
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 6 Apr 2011 20:46:42 +0000 (20:46 +0000)]
I can't figure out any reasonable way to make this test non-host-dependent,
so I'm killing it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 6 Apr 2011 18:42:48 +0000 (18:42 +0000)]
Wide Pascal strings should be of type wchar_t[] and not unsigned char[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 6 Apr 2011 18:40:08 +0000 (18:40 +0000)]
Fix lookup for class messages sent to qualified-class
types such that protocols are seached first. Fixes
// rdar://
9224670
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129016
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 6 Apr 2011 18:22:53 +0000 (18:22 +0000)]
Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129014
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Wed, 6 Apr 2011 18:22:12 +0000 (18:22 +0000)]
Added link to LLVM cmake page in Visual Studio section.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 6 Apr 2011 16:05:26 +0000 (16:05 +0000)]
Refine rules for atomic property api to
pass a previously failing clang test.
// rdar://
8808439
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 6 Apr 2011 12:29:09 +0000 (12:29 +0000)]
Do not use IR marker for LLVM intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 6 Apr 2011 12:29:04 +0000 (12:29 +0000)]
If this is an intrinsic function, set the function's attributes to the intrinsic's attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129000
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 6 Apr 2011 09:02:12 +0000 (09:02 +0000)]
When updating the retain summary based on {cf,ns}_consumed attributes,
be sure to consume the argument index that actually had the attribute
rather than always the first. rdar://problem/
9234108
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128998
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 6 Apr 2011 06:48:04 +0000 (06:48 +0000)]
Make this a -cc1 test with a triple and a target feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128993
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 6 Apr 2011 04:29:52 +0000 (04:29 +0000)]
Anonymify this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128987
91177308 -0d34-0410-b5e6-
96231b3b80d8