Anna Zaks
88d9462b73
[analyzer] Subclassing StmtBuilder from the NodeBuilder
...
llvm-svn: 142451
2011-10-18 23:06:33 +00:00
Anna Zaks
e83ddcc4ec
[analyzer] Remove dead code.
...
ExprEngineBuilders is not used.
llvm-svn: 142450
2011-10-18 23:06:29 +00:00
Anna Zaks
ea96f5b852
[analyzer] Remove redundant method + whitespace.
...
llvm-svn: 142449
2011-10-18 23:06:25 +00:00
Anna Zaks
6d285c58ec
[analyzer] Modularize builder use in processBranch.
...
Take advantage of the new builders for branch processing. As part of this change pass generic NodeBuilder (instead of BranchNodeBuilder) to the BranchCondition callback and remove the unused methods form BranchBuilder.
llvm-svn: 142448
2011-10-18 23:06:21 +00:00
Anna Zaks
eebbbc7253
[analyzer] Pull Pred out of NodeBuilderContext.
...
Each builder will have a different one, so it doesn't make sense to keep it in the context.
llvm-svn: 142447
2011-10-18 23:06:16 +00:00
Anna Zaks
2e2eb49f7f
[analyzer] Rely only on NodeBuilder inside CheckerContext.
...
llvm-svn: 142446
2011-10-18 23:06:11 +00:00
Anna Zaks
1ee9f11631
[analyzer] Remove redundant assignment operator.
...
llvm-svn: 142445
2011-10-18 23:06:08 +00:00
Anna Zaks
ce5e97efdd
[analyzer] NodeBuilder Refactoring: Subclass BranchNodeBuilder from NodeBuilder.
...
llvm-svn: 142444
2011-10-18 23:06:04 +00:00
Anna Zaks
fc0189aadc
[analyzer] Node Builder refactoring: Introduce a simple Node Builder responsible for generating the node frontier.
...
Currently we have a bunch of different node builders which provide some common
functionality but are difficult to refactor. Each builder generates nodes of
different kinds and calculates the frontier nodes, which should be propagated
to the next step (after the builder dies).
Introduce a new NodeBuilder which provides very basic node generation facilities
but takes care of the second problem. The idea is that all the other builders
will eventually use it. Use this builder in CheckerContext instead of
StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder
is a hack and will be removed later on).
llvm-svn: 142443
2011-10-18 23:05:58 +00:00
John McCall
59207978e6
More metaprogramming with builtin types.
...
llvm-svn: 142433
2011-10-18 22:28:37 +00:00
Argyrios Kyrtzidis
72a3cf0a4a
[libclang] Make sure we do a correct invalid check in clang_getExpansionLocation.
...
llvm-svn: 142430
2011-10-18 21:59:54 +00:00
Douglas Gregor
7c0fc61faa
Minor tweak to test
...
llvm-svn: 142427
2011-10-18 21:43:22 +00:00
Richard Smith
c82397332d
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 2.
...
llvm-svn: 142426
2011-10-18 21:39:00 +00:00
Douglas Gregor
c1939d3967
Remove unused data member
...
llvm-svn: 142425
2011-10-18 21:25:15 +00:00
Douglas Gregor
e5c79d5ea8
Provide result types for code completions that describe built-in
...
expressions (this, sizeof, etc.).
llvm-svn: 142424
2011-10-18 21:20:17 +00:00
John McCall
91aee685d8
Add a __has_feature check for arc_cf_code_audited.
...
llvm-svn: 142423
2011-10-18 21:18:53 +00:00
John McCall
e314e27c58
Macro metaprogramming for builtin types.
...
llvm-svn: 142420
2011-10-18 21:02:43 +00:00
Richard Smith
0bf8a492fd
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.
...
llvm-svn: 142419
2011-10-18 20:49:44 +00:00
Daniel Dunbar
b274318bba
Frontend: Support -iframework.
...
llvm-svn: 142418
2011-10-18 20:40:38 +00:00
Richard Smith
aed32b4d8c
Simplify RecordDeclCXX::setBases slightly. No functional change.
...
Add test that a variadic base list which expands to 0 bases doesn't make the
class a non-aggregate. This test passed before the change, too.
llvm-svn: 142411
2011-10-18 20:08:55 +00:00
Fariborz Jahanian
2f31b33f34
objc: more changes in use of IBOutletCollection attribute.
...
'Class' is disallowed as argument. If the argument is missing,
NSObject is assumed. // rdar://10296078
llvm-svn: 142409
2011-10-18 19:54:31 +00:00
Argyrios Kyrtzidis
05c65fbdb6
[arcmt] Rewrite attributes in extensions as well. rdar://9992142
...
llvm-svn: 142407
2011-10-18 19:49:19 +00:00
Argyrios Kyrtzidis
b51684d7a1
Set the objc "property attributes as written" for extension properties as well.
...
llvm-svn: 142406
2011-10-18 19:49:16 +00:00
Richard Smith
c30493db3c
In C++11, a class's members are allowed to be nominated as friends.
...
llvm-svn: 142393
2011-10-18 18:33:57 +00:00
Argyrios Kyrtzidis
058b451d87
[driver] Make the driver to link the simulator arclite lib when passing -mios-simulator-version-min.
...
rdar://10218700
llvm-svn: 142372
2011-10-18 17:40:15 +00:00
Fariborz Jahanian
6b70865ec0
objc: diagnose invalid argument to an
...
iboutletcollection attribute intead of crashing.
// rdar://10296078
llvm-svn: 142364
2011-10-18 17:11:10 +00:00
Argyrios Kyrtzidis
098c4eabd2
[libclang] Since an objc extension semantically continues the interface of the class
...
don't use unique USRs for them, otherwise we fail to associate @implementation methods
with the methods in extensions.
llvm-svn: 142361
2011-10-18 16:50:06 +00:00
Douglas Gregor
09deffa067
Make it possible to compute the type of 'this' without capturing
...
it. Refactoring to be used in a moment.
llvm-svn: 142360
2011-10-18 16:47:30 +00:00
Douglas Gregor
4205feffcd
Add code completions for C++0x expressions
...
llvm-svn: 142357
2011-10-18 16:29:03 +00:00
Argyrios Kyrtzidis
0c7735e525
[libclang] Index implicit property references.
...
llvm-svn: 142355
2011-10-18 15:50:50 +00:00
Argyrios Kyrtzidis
1c7dcd04b8
[libclang] When printing the diagnostic print it with a new line.
...
llvm-svn: 142354
2011-10-18 15:13:14 +00:00
Argyrios Kyrtzidis
321e30216a
[libclang] Index method references.
...
llvm-svn: 142353
2011-10-18 15:13:11 +00:00
Benjamin Kramer
80ca407610
Use llvm::Triple's methods to parse FreeBSD version numbers.
...
Who could've thought that FreeBSD would ever reach version 10!
Patch from Dimitry Andric.
llvm-svn: 142349
2011-10-18 10:10:08 +00:00
Hans Wennborg
a5d653c7dd
Another attempt at fixing format-strings-fixit.c.
...
Use "%f" as format string to make sure it doesn't match size_t, etc.
whatever they might be typedeffed to, so that the fixit always applies.
llvm-svn: 142348
2011-10-18 09:30:37 +00:00
Hans Wennborg
95c49c6c32
Disable the ssize_t test in format-strings-fixit.c.
...
Turns out this part of the test from r142342 wasn't portable.
The errors on the bots look like this:
E:\bb-win7\cmake-clang-i686-msys\build\tools\clang\test\Sema\Output\format-strings-fixit.c.tmp:58:13: error: conversion specifies type 'unsigned int' but the argument has type 'ssize_t' (aka 'long')
printf("%zd", (ssize_t) 42);
~~^ ~~~~~~~~~~~~
%zd
Obviously we can't typedef ssize_t to someting that doesn't have the same size as size_t and expect it to work.
But it's also weird that the format string "%zd" gets interpreted as "unsigned int" when it should clearly be signed.
llvm-svn: 142345
2011-10-18 08:58:16 +00:00
Hans Wennborg
f99d04f841
Suggest %zu for size_t args to printf.
...
For PR11152. Make PrintSpecifier::fixType() suggest "%zu" for size_t, etc.
rather than looking at the underlying type and suggesting "%llu" or other
platform-specific length modifiers. Applies to C99 and C++11.
llvm-svn: 142342
2011-10-18 08:10:06 +00:00
David Blaikie
cc5f8f0d9e
Switch to the C++11 warning flags in tests.
...
Patch by Ahmed Charles!
llvm-svn: 142340
2011-10-18 05:54:07 +00:00
David Blaikie
8317245f9c
Update documentation to use "C++11" instead of "C++0x"
...
llvm-svn: 142339
2011-10-18 05:49:30 +00:00
Douglas Gregor
d793e7c3f7
Don't format the code completion for parameters of block literal
...
arguments as block literal arguments; the block literal argument code
completion should only go one level deep. Fixes <rdar://problem/10291294>.
llvm-svn: 142335
2011-10-18 04:23:19 +00:00
Richard Smith
83c19296ff
Add -Wc++11-compat warning for an inline specifier on an explicit instantiation.
...
llvm-svn: 142333
2011-10-18 03:44:03 +00:00
Douglas Gregor
f333f8c40d
When transforming the arguments for a C++ "new" expression, make sure
...
to drop the implicitly-generated value initialization expression used
for initializing scalars. Fixes <rdar://problem/10283928>.
llvm-svn: 142330
2011-10-18 02:43:19 +00:00
Richard Smith
050d261ec7
Refactor the checking for explicit template instantiations being performed in
...
the right namespace in C++11 mode. Teach the code to prefer the 'must be in
precisely this namespace' diagnostic whenever that's true, and fix a defect
which resulted in the -Wc++11-compat warning in C++98 mode sometimes being
omitted.
llvm-svn: 142329
2011-10-18 02:28:33 +00:00
John McCall
43d4dd49bf
Argyrios says this change is required for safety under PTH.
...
Me, I believe him.
llvm-svn: 142327
2011-10-18 01:36:41 +00:00
Eli Friedman
66005df1f1
Revert accidental commit.
...
llvm-svn: 142326
2011-10-18 01:18:41 +00:00
Eli Friedman
5e9534b0ae
Rewrite parts of MS ABI C++ layout. Based on work by r4start; I ended up doing this while I was trying to review his patch.
...
llvm-svn: 142325
2011-10-18 00:55:28 +00:00
John McCall
95ff270ee9
Fix several bugs with #pragma clang arc_cf_code_audited and macros.
...
llvm-svn: 142324
2011-10-18 00:44:04 +00:00
Argyrios Kyrtzidis
697729a7de
Revert r142311, -mios-simulator-version-min does not work correctly.
...
llvm-svn: 142322
2011-10-18 00:22:49 +00:00
John McCall
1bb357929d
In hasPlaceholderType(Kind) and isSpecificPlaceholderType(Kind), assert
...
that the parameter is actually a placeholder type kind.
llvm-svn: 142312
2011-10-17 23:48:15 +00:00
Argyrios Kyrtzidis
7e16493c9b
Remove the hack where we sniff the __IPHONE_OS_VERSION_MIN_REQUIRED define.
...
We can use -mios-simulator-version-min now. rdar://10218700
llvm-svn: 142311
2011-10-17 23:41:26 +00:00
Richard Smith
9fcc5c31c4
Perform lvalue-to-rvalue conversions on __builtin_offsetof array argument index
...
before typechecking, as suggested by John.
llvm-svn: 142308
2011-10-17 23:29:39 +00:00