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
5e152ce3fe
Fixed type and declaration source range in presence of typeQuals.
...
llvm-svn: 127535
2011-03-12 11:02:00 +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
cd628393bb
Tweak test to hopefully appease FreeBSD buildbot.
...
llvm-svn: 127533
2011-03-12 08:19:43 +00:00
Ted Kremenek
9997656600
Remove stray output file.
...
llvm-svn: 127532
2011-03-12 06:15:01 +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
Ken Dyck
30a87e38d9
Change parameter to AppendPadding from bytes to CharUnits. No change in
...
functionality intended.
llvm-svn: 127513
2011-03-11 23:42:54 +00:00
Douglas Gregor
5ecbb1bc24
Don't ask if a depenendent CXXRecordDecl has any dependent bases
...
unless we already know that it has a definition. Fixes
PR9449/<rdar://problem/9115785>.
llvm-svn: 127512
2011-03-11 23:27:41 +00:00
Douglas Gregor
e9e27d95db
Implement a hack intended to allow Clang to parse libstdc++ 4.5's
...
headers, which use C++0x generalized initializer lists. Per PR7069, it
appears that the only use is as the return type of a function, so this
commit enables this extension just in that narrow case. If it's enough
for libstdc++ 4.5, or if it can be trivially extended to work with
libstdc++ 4.5, we'll keep it. Otherwise, or if this breaks anything,
we'll revert and wait for the real feature.
llvm-svn: 127507
2011-03-11 23:10:44 +00:00
John McCall
32ea969415
Use a slightly more semantic interface for emitting call arguments.
...
llvm-svn: 127494
2011-03-11 20:59:21 +00:00
Peter Collingbourne
c77f85b4b0
OpenCL: if double precision floating point constant encountered
...
without cl_khr_fp64, warn and cast to single precision
llvm-svn: 127476
2011-03-11 19:24:59 +00:00
Peter Collingbourne
e190dee7a5
Add support for the OpenCL vec_step operator, by generalising and
...
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.
llvm-svn: 127475
2011-03-11 19:24:49 +00:00
Rafael Espindola
6b7e3bc992
Fix PR9453 by not trying to print a warning about ignored qualifiers
...
in conversion functions.
llvm-svn: 127460
2011-03-11 04:56:58 +00:00
John McCall
7684ddee7c
When comparing a null pointer and something else, always cast the null
...
pointer instead of the other operand.
llvm-svn: 127458
2011-03-11 04:25:25 +00:00
Ken Dyck
327b77a442
Convert the RecordSize parameter of AppendTailPadding() to CharUnits to
...
avoid converting to bits and back again. No change in functionality
intended.
llvm-svn: 127455
2011-03-11 02:17:05 +00:00
Ken Dyck
dbc0191181
Overload IntExprEvaluator::Success() with a function that takes a CharUnits
...
parameter to tidy up the places where the expression is a size.
llvm-svn: 127454
2011-03-11 02:13:43 +00:00
Ted Kremenek
339f7c3c58
Tweak ccc-analyzer's 'Analyze' function to not mutate the original arguments list.
...
llvm-svn: 127428
2011-03-10 21:10:08 +00:00
Ted Kremenek
4c0826c236
Profiling showed that 'CheckImplicitConversions' was very slow because of the call to getSpellingLoc(). On 'aes.c'
...
in the LLVM test suite, this function was consuming 7.4% of -fsyntax-only time. This change fixes this issue
by delaying the check that the warning would be issued within a system macro by as long as possible. The
main negative of this change is now the logic for this check is done in multiple places in this function instead
of just in one place up front.
llvm-svn: 127425
2011-03-10 20:03:42 +00:00
NAKAMURA Takumi
dd63436808
lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.
...
llvm-svn: 127405
2011-03-10 14:02:21 +00:00
Abramo Bagnara
0adf29a5bd
Avoid do drop outer template parameter lists on the floor.
...
llvm-svn: 127404
2011-03-10 13:28:31 +00:00
Abramo Bagnara
19fd03e277
Fixed class type generation for MemberPointerType.
...
llvm-svn: 127401
2011-03-10 10:18:27 +00:00
Ted Kremenek
a099c595bf
When doing reachability analysis for warnings issued under DiagRuntimeBehavior, don't construct a ParentMap or CFGStmtMap.
...
Instead, create a small set of Stmt* -> CFGBlock* mappings during CFG construction for only the statements we care about
relating to the diagnostics we want to check for reachability.
llvm-svn: 127396
2011-03-10 03:50:34 +00:00
Ken Dyck
a1a2e8decb
Instead of round up sizes to '8', round them up to the alignment of the char
...
type.
llvm-svn: 127391
2011-03-10 02:00:35 +00:00
Ken Dyck
e73807538a
Round up the non-virtual size to the next char instead of rounding down.
...
llvm-svn: 127390
2011-03-10 01:53:59 +00:00
Ted Kremenek
7c58d35240
Require AddStmtChoice::alwaysAdd() to take a CFGBuilder& and Stmt*. Prep for functionality changes.
...
llvm-svn: 127387
2011-03-10 01:14:11 +00:00
Ted Kremenek
2866bab5fa
Remove unused 'AddStmtChoice' argument to CFGBuilder::appendStmt().
...
llvm-svn: 127386
2011-03-10 01:14:08 +00:00
Ted Kremenek
f9d8290af1
Rework interaction between AnalysisContext and CFG::BuildOptions to keep a BuildOptions object around instead of keeping a copy of the flags.
...
Moreover, change AnalysisContext to use an OwningPtr for created analysis objects instead
of directly managing them.
Finally, add a 'forcedBlkExprs' entry to CFG::BuildOptions that will be used by the
CFGBuilder to force specific expressions to be block-level expressions.
llvm-svn: 127385
2011-03-10 01:14:05 +00:00
Daniel Dunbar
334b2136f6
Revert r127206 "Detect attempts to provide a specialization of a function within
...
a...", it appears to cause us to reject various valid codes.
llvm-svn: 127373
2011-03-09 23:24:34 +00:00
Argyrios Kyrtzidis
4b8093ab5e
Silence gcc warnings.
...
llvm-svn: 127370
2011-03-09 23:15:22 +00:00
Fariborz Jahanian
b296e330a3
Property setter/getter must be looked up in property type's
...
list of protocols as well. // rdar://9078584
llvm-svn: 127367
2011-03-09 22:17:12 +00:00
Argyrios Kyrtzidis
4dfe569d93
Fix CMake build.
...
llvm-svn: 127360
2011-03-09 21:12:34 +00:00
Fariborz Jahanian
3dc11ad796
Lookup selector in protocol list of qualified objc type
...
to avoid a bogus warning. // rdar:// 9072298
llvm-svn: 127355
2011-03-09 20:18:06 +00:00
Argyrios Kyrtzidis
35dcda7922
Introduce '-chain-include' option to specify headers that will be converted to chained PCHs in memory
...
without having to use multiple runs and intermediate files.
Intended for testing & debugging of chained PCH.
llvm-svn: 127339
2011-03-09 17:21:42 +00:00
Douglas Gregor
20cbd059d4
Mention an XML printer on the Open Projects page
...
llvm-svn: 127336
2011-03-09 16:27:48 +00:00
Abramo Bagnara
29c2d46786
Fixed InnerLocStart.
...
llvm-svn: 127330
2011-03-09 14:09:51 +00:00
NAKAMURA Takumi
4e8c365e9a
include/clang/Basic/BuiltinsX86.def: __builtin_ia32_crc32**() should be defined to take unsigned args and to return unsigned value.
...
mingw-w64's intrin.h declares __builtin_ia32_crc32**() as external.
llvm-svn: 127329
2011-03-09 12:00:19 +00:00
Chandler Carruth
1b7cc20fd8
FileCheckize this test.
...
llvm-svn: 127327
2011-03-09 10:56:54 +00:00