Fariborz Jahanian
b03a4c23c2
Don't poke into redefined 'id' type looking for a property
...
declaration as this results in a confusing error message,
instead of message related to missing property declaration.
// rdar://9106929
llvm-svn: 127682
2011-03-15 17:27:48 +00:00
Ted Kremenek
e3ae0a4c47
Appease GCC. I'm surprised Clang accepted this.
...
llvm-svn: 127672
2011-03-15 05:30:12 +00:00
Ted Kremenek
1a47f366b7
Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.
...
llvm-svn: 127669
2011-03-15 05:22:28 +00:00
Ted Kremenek
c8c4e5f371
Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.
...
llvm-svn: 127666
2011-03-15 04:57:38 +00:00
Ted Kremenek
9b15c962a9
UninitializedValues: introduce ValueVector:reference class to forward to llvm::BitVector. No real functionality change, but this is a stepping stone to moving to tri-state logic.
...
llvm-svn: 127665
2011-03-15 04:57:32 +00:00
Ted Kremenek
d3def3841f
UninitializedValues: wrap BitVector references in a new class ValueVector. No functionality change. This defines the minimum interface that ValueVector needs to support when we no longer base it strictly on a direct interpretation of BitVector.
...
llvm-svn: 127664
2011-03-15 04:57:29 +00:00
Ted Kremenek
a895fe999d
Substitue term "BitVector" with "ValueVector" to prep for further revisions. No functionality change.
...
llvm-svn: 127663
2011-03-15 04:57:27 +00:00
Ted Kremenek
a0a5ca14d0
Rename UninitializedValuesV2 to UninitializedValues.
...
llvm-svn: 127657
2011-03-15 03:17:07 +00:00
Ted Kremenek
792798549f
Remove old UninitializedValues analysis.
...
llvm-svn: 127656
2011-03-15 03:17:01 +00:00
NAKAMURA Takumi
b2beb018b8
lib/Basic/Targets.cpp: __declspec(attr) should be provided on mingw as macro, alias of __attribute__.
...
On mingw without -fms-extensions, we can provide "as-is" __declspec.
llvm-svn: 127655
2011-03-15 02:32:50 +00:00
NAKAMURA Takumi
1a780ee8a9
lib/Headers/mm_malloc.h: On Windows, we can expect _mm_malloc would be provided as macro by <malloc.h>.
...
llvm-svn: 127654
2011-03-15 02:32:43 +00:00
NAKAMURA Takumi
63b4b456be
lib/Frontend/InitHeaderSearch.cpp: Introduce AddMinGW64CXXPaths(Base) for x86_64-w64-mingw32.
...
llvm-svn: 127652
2011-03-15 02:32:36 +00:00
Ken Dyck
1c80fd1346
Introduce a CharUnits FieldOffsetInChars variable in AppendField() to
...
replace some uses of FieldOffsetInBytes. The remaining uses of
FieldOffsetInBytes will be replaced once NextFieldOffsetInBytes is converted
to CharUnits. No change in functionality intended.
llvm-svn: 127641
2011-03-15 01:09:02 +00:00
Argyrios Kyrtzidis
669b0b1521
Stop leaking file descriptors.
...
After the open+fstat optimization, files were already opened for FileManager::getBufferForFile() and we closed them after reading them.
The problem was that when -working-directory was passed, the code path that actually reuses & closes the already opened file descriptor
was not followed.
llvm-svn: 127639
2011-03-15 00:47:44 +00:00
Jakob Stoklund Olesen
fcaa2e1ba4
Revert r127617: "Code generation for noexcept."
...
The tests fail in a -Asserts build.
llvm-svn: 127635
2011-03-15 00:18:21 +00:00
Douglas Gregor
1e98986160
Disable 'auto' type deduction in Objective-C. It likes 'id' a bit too
...
much to be useful.
llvm-svn: 127625
2011-03-14 21:43:30 +00:00
Joerg Sonnenberger
161f9a3829
Sort
...
llvm-svn: 127624
2011-03-14 21:20:46 +00:00
Douglas Gregor
88764cf822
When synthesizing a label declaration based on a goto statement that
...
cannot yet be resolved, be sure to push the new label declaration into
the right place within the identifier chain. Otherwise, name lookup in
C++ gets confused when searching for names that are lexically closer
than the label. Fixes PR9463.
llvm-svn: 127623
2011-03-14 21:19:51 +00:00
Rafael Espindola
0c1f098284
Switch from internal to linker_private linkage, it is sufficient to please the new linker.
...
llvm-svn: 127622
2011-03-14 21:08:19 +00:00
Sebastian Redl
97022fd325
Code generation for noexcept.
...
llvm-svn: 127617
2011-03-14 20:33:20 +00:00
Eric Christopher
cf5e83b471
__clear_cache() is varargs and people will occasionally write it without
...
arguments. Process only the arguments that people write, but process
all of them.
Fixes rdar://8900346
llvm-svn: 127616
2011-03-14 20:30:34 +00:00
Ted Kremenek
066b226daa
Tweak VariadicMethodTypeChecker to only create one ExplodedNode when issuing multiple warnings for the same message expression.
...
Also add a test case showing that we correctly report multiple warnings for the same message expression.
llvm-svn: 127605
2011-03-14 19:50:37 +00:00
Sebastian Redl
771f57de1c
Implement instantiation of noexcept spec and add a test case.
...
llvm-svn: 127603
2011-03-14 18:51:50 +00:00
Sebastian Redl
37588097af
Make deallocation functions implicitly noexcept in C++0x.
...
llvm-svn: 127596
2011-03-14 18:08:30 +00:00
Rafael Espindola
7a6cf01895
Fix link of libxul with LTO and the linker in xcode4. It is not clear if this
...
is working around a bug in ld or if the new linker has a reasonable reason
for wanting the string constant to be linker visible.
llvm-svn: 127594
2011-03-14 17:55:00 +00:00
Douglas Gregor
e981bb0e5c
-fwritable-strings should silence warnings about the deprecated string
...
-literal to char* conversion. Make it so.
llvm-svn: 127586
2011-03-14 16:13:32 +00:00
Fariborz Jahanian
90186f8a3e
Block return type of the initialized must be
...
be more speciaclized than that of the initializer,
when matching protocol qualifier list.
// rdar:// 9118343.
llvm-svn: 127585
2011-03-14 16:07:00 +00:00
Douglas Gregor
0a36f4d654
Support Ubuntu hardy and intrepid, from Thomas Gamper!
...
llvm-svn: 127583
2011-03-14 15:39:50 +00:00
Douglas Gregor
7ee23a8698
Add include paths for Gentoo Linux, from Marcin Mirosław!
...
llvm-svn: 127582
2011-03-14 15:33:44 +00:00
David Chisnall
f836b5bc3f
Fix incorrect linkage specifiers for selectors.
...
llvm-svn: 127580
2011-03-14 15:01:16 +00:00
Anders Carlsson
9ba8fb1e48
Get rid of the static FileManager::FixupRelativePath.
...
llvm-svn: 127573
2011-03-14 01:13:54 +00:00
Anders Carlsson
d91d5f162f
Add an Objective-C checker that checks that arguments passed to some variadic Objective-C methods are of Objective-C pointer types.
...
Ted or Argiris, I'd appreciate a review!
llvm-svn: 127572
2011-03-13 20:35:21 +00:00
Sebastian Redl
31ad754c96
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.
...
llvm-svn: 127568
2011-03-13 17:09:40 +00:00
Ted Kremenek
53e6538fa8
Fix CFG assertion failure reported in PR 9467. This was due to recent changes in optimizing CFGs for switch statements.
...
llvm-svn: 127563
2011-03-13 03:48:04 +00:00
Fariborz Jahanian
c677f69397
Place duplicate argument declaration in in
...
method prototypes under the -Wduplicate-method-arg and
turn it off by default.
llvm-svn: 127552
2011-03-12 18:54:30 +00:00
Sebastian Redl
9cb4be2466
Revert "Disable delegating constructors for 2.9"
...
It is only meant for the release branch.
llvm-svn: 127544
2011-03-12 13:53:51 +00:00
Sebastian Redl
a2cb77f54e
Disable delegating constructors for 2.9
...
llvm-svn: 127543
2011-03-12 13:53:47 +00:00
Sebastian Redl
c1f8e493da
Revert "Disable inherited constructors for 2.9."
...
It is only meant for the release branch.
llvm-svn: 127542
2011-03-12 13:44:32 +00:00
Sebastian Redl
1dc2c1d27f
Disable inherited constructors for 2.9.
...
llvm-svn: 127541
2011-03-12 13:44:23 +00:00
Ken Dyck
a862d95054
Use CharUnits for argument passed to AppendPadding() from AppendBitField().
...
No change in functionality intended.
llvm-svn: 127538
2011-03-12 12:03:11 +00:00
Sebastian Redl
fa453cfdc3
Propagate the new exception information to FunctionProtoType.
...
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.
llvm-svn: 127537
2011-03-12 11:50:43 +00:00
Abramo Bagnara
f2a79d94e4
Forgotten part of previous commit.
...
llvm-svn: 127536
2011-03-12 11:17:06 +00:00
Abramo Bagnara
6b6f051e5e
Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
...
llvm-svn: 127534
2011-03-12 09:45:03 +00:00
Ted Kremenek
a4a57c10da
Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.
...
llvm-svn: 127531
2011-03-12 06:14:28 +00:00
Ted Kremenek
e5a89ac52a
Don't have side-effects (or rather non-trivial computation) in StringSwitch "cases."
...
llvm-svn: 127528
2011-03-12 04:08:07 +00:00
Ted Kremenek
f89710b936
Add initial version of "IteratorsChecker", a checker to find misues uses of C++ iterators.
...
This checker was created by Jim Goodnow II, and I migrated it to the
new Checker interface (recent changes by Argiris).
llvm-svn: 127525
2011-03-12 02:49:15 +00:00
Ted Kremenek
52d264cda5
Fix comments, and force auto progagation in VisitAggExpr.
...
llvm-svn: 127524
2011-03-12 02:49:11 +00:00
Ted Kremenek
97474f7414
static analyzer: Handle 'ExprWithCleanups' in ExprEngine by essentially ignoring them.
...
llvm-svn: 127523
2011-03-12 02:49:09 +00:00
Douglas Gregor
1beec45a61
Fixes for some more expressions containing function templateids that
...
should be resolvable, from Faisal Vali!
llvm-svn: 127521
2011-03-12 01:48:56 +00:00
Douglas Gregor
364f7db063
When we're determining whether to complain about a conversion from one
...
enumeration type to another in C, classify enumeration constants as if
they had the type of their enclosing enumeration. Fixes
<rdar://problem/9116337>.
llvm-svn: 127514
2011-03-12 00:14:31 +00:00