Argyrios Kyrtzidis
c0a575f9b7
Make DiagnosticErrorTrap keep a count of the errors that occurred so multiple
...
DiagnosticErrorTraps can be composed (e.g. a trap inside another trap).
Fixes http://llvm.org/PR10462 & rdar://9852007.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136447 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 01:25:44 +00:00
Douglas Gregor
53afad5ebb
This patch makes the string/character literal tests run in C,
...
C++98/03, and C++0x mode, from Craig Topper!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136443 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 01:08:54 +00:00
Douglas Gregor
eda6158412
Remove unused debug function
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136442 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:59:35 +00:00
Douglas Gregor
9827a8049a
In the ASTReader, replace the continuous range maps whose value types
...
were (Module*, Offset) with equivalent maps whose value type is just a
Module*. The offsets have moved into corresponding "Base" fields
within the Module itself, where they will also be helpful for
local->global translation (eventually).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136441 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:56:45 +00:00
Peter Collingbourne
93f1322684
Fix assertion failure in CodeGen where the input operand to an asm
...
instruction is tied to an output operand which is a pointer, and
the input operand is narrower than the output operand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136438 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:24:50 +00:00
Peter Collingbourne
9aab148986
Fix an inconsistency in Sema::ConvertArgumentsForCall in that
...
the callee note diagnostic was not emitted in the case where
there were too few arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136437 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:24:42 +00:00
Douglas Gregor
1e849b6f43
Move the base type ID from the ASTReader's global type map into the
...
Module itself, which makes more sense. This pattern to be repeated
several more times.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136436 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:21:44 +00:00
Chandler Carruth
e3b075b816
Remove an unused function (found by Clang's -Wunused-function)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136434 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 00:15:44 +00:00
Fariborz Jahanian
fefe91e601
objective-c: warn if implementation of a method in category
...
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:19:50 +00:00
Jonathan D. Turner
b4ae29ced8
Some documentation fixes so that we are explicit about which iteration order is source-order. Also, removing unused NextInSource field of Module.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136423 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:15:22 +00:00
Ted Kremenek
a4c7a4314f
Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:08:16 +00:00
Ted Kremenek
fc5b21df5f
Remove flat store tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136421 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:08:04 +00:00
Ted Kremenek
af9ef7f146
Remove FlatStoreManager and BasicStoreManager. The latter has long been obsolete and the former has no had development in a long time.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136420 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:08:02 +00:00
Ted Kremenek
8829989238
[analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.
...
The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.
Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136419 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:59 +00:00
Ted Kremenek
217470e075
[analyzer] fix bug in malloc checker where the tracked symbol would not properly be removed from the state.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136418 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:51 +00:00
Ted Kremenek
fde18c5354
[analyzer] add accessor to StoreRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136417 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:49 +00:00
Ted Kremenek
fa7a95c62a
[analyzer] Add StoreManager::includedInBindings() to to query whether a region is used in any bindings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136416 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:46 +00:00
Ted Kremenek
31d922fdbf
[analyzer] Add safety checking in RegionStoreManager for string literal underruns.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136415 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:43 +00:00
Ted Kremenek
90e2f534f0
[analyzer] Teach Environment to not look through MaterializeTemporaryExprs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136414 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:41 +00:00
Ted Kremenek
6c370d9d49
[analyzer] Fix bug in ObjCMessage where casts were being incorrectly ignored.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:38 +00:00
Ted Kremenek
eea72a925f
[analyzer] fix handling of MaterializeTemporaryExpr by binding the result value to
...
the proper expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136412 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:36 +00:00
Douglas Gregor
86c67d8802
Introduce the local-global mapping for preprocessed entities, and use
...
it appropriately. Also, patch up a place where we were failing to map
local macro definition IDs into global macro definition IDs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136411 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 22:39:26 +00:00
Douglas Gregor
e144c70d07
Use local-to-global mapping appropriately for macro definitions in the ASTReader
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 22:16:57 +00:00
Douglas Gregor
2d2689ab78
Use the local -> global mapping functions for selectors more
...
consistently in the ASTReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136395 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 21:16:51 +00:00
Douglas Gregor
95eab176f5
Teach the ASTReader to perform local and global mapping of identifier
...
IDs properly, although the mapping itself is still trivial.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136391 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:55:49 +00:00
Anna Zaks
d5612a235f
Add a fixit for removal of unused label.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136389 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:52:06 +00:00
Richard Trieu
7efa0e0382
Fix a test case that was intermittently failing. The issue was that instantiations are not stored in an order preserving structure, so the print order may be impacted. Modified test case to do two FileCheck passes to ensure that both instantiations are in the same place.
...
Test originially commited at r136306 and temporarily silenced at r136348.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136385 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:30:10 +00:00
Caitlin Sadowski
db33e14661
Added basic parsing for all remaining attributes, thread safety
...
analysis. This includes checking that the attributes are applied in the
correct contexts and with the correct number of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 20:12:35 +00:00
Anna Zaks
1d05d424cb
Another test case for the &/* mismatch fixit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136380 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:55:52 +00:00
Anna Zaks
6722155dfe
Add */& mismatch fixit generation to the Sema::DiagnoseAssignmentResult().
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136379 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:51:27 +00:00
Douglas Gregor
6e4a3f5c59
Make the deserialization of Sema::PendingInstantiations lazy. At this
...
point, ASTReader::InitializeSema() has very little interesting work,
*except* issues stemming from preloaded declarations. That's something
we'll still need to cope with.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136378 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:49:54 +00:00
Anna Zaks
f3546eeef1
Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136376 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:46:48 +00:00
Douglas Gregor
f2abb52acb
Promote the deserialized PendingInstantiations vector from being a
...
Module member to being an ASTReader member; we want it to be
centralized for lazy deserialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136373 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:26:52 +00:00
Douglas Gregor
dfe6543e12
Lazily deserialize Sema::VTableUses. Plus, fix the utterly and
...
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 19:11:31 +00:00
Caitlin Sadowski
73cbbc8d78
Thread safety: Fix typo in documentation
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 18:38:36 +00:00
Douglas Gregor
31e37b2d7b
Make Sema::WeakUndeclaredIdentifiers lazily deserialized.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 18:09:57 +00:00
Jonathan D. Turner
8a22e27af5
Add missing documentation onto new member variable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136365 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 17:42:18 +00:00
Caitlin Sadowski
fdde9e719a
Added parsing for guarded_var, pt_guarded_var, lockable,
...
scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 17:21:07 +00:00
Jonathan D. Turner
1afb661bc5
Switch the ModuleManager over to using a FileManager and FileEntry* as part of its lookup instead of the filename. This is a more correct unique identifier, as symlinks can be handled by the FileManager.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136363 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 17:20:23 +00:00
Douglas Gregor
5b9dc7caae
Make Sema::ReferencedSelectors lazily deserialized.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 14:54:22 +00:00
Douglas Gregor
8451ec7e70
Move a Module's ReferencedSelectorsData into the ASTReader itself, so
...
that it accumulates referenced selectors from each of the modules/PCH
files as they are loaded. No actual functionality change, yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136356 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 14:41:43 +00:00
Douglas Gregor
ec12ce2f6d
Make Sema::LocallyScopedExternalDecls lazily deserialized. In theory,
...
we could turn this into an on-disk hash table so we don't load the
whole thing the first time we need it. However, it tends to be very,
very small (i.e., empty) for most precompiled headers, so it isn't all
that interesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136352 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 14:20:37 +00:00
NAKAMURA Takumi
a26da1a97e
test/Misc/ast-dump-templates.cpp: Disable this temporarily due to unstable output.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136348 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 12:10:58 +00:00
NAKAMURA Takumi
27f1e7ec18
test/CodeGen/2004-03-16-AsmRegisterCrash.c: XTARGET should accept the part of triplet. ("x86" is not the part of triplet)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136346 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 11:25:02 +00:00
John McCall
d46f763aab
Make a note about a missing optimization.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136340 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 07:41:22 +00:00
John McCall
fb7208119a
Fix a couple of problems with initialization and assignment to
...
__block variables where the act of initialization/assignment
itself causes the __block variable to be copied to the heap
because the variable is of block type and is being assigned
a block literal which captures the variable.
rdar://problem/9814099
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136337 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 07:23:35 +00:00
NAKAMURA Takumi
a17f0c486d
test/CodeGen/struct-matching-constraint.c: Fixup not to emit garbage to source tree.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136333 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 04:50:11 +00:00
Douglas Gregor
b4dc485a2b
AST serialization support for the Framework in IndexHeaderMapHeader
...
fields of HeaderFileInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136332 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 04:50:02 +00:00
Douglas Gregor
65e02fa80e
Introduce the "-index-header-map" option, to give special semantics
...
for quoted header lookup when dealing with not-yet-installed
frameworks. Fixes <rdar://problem/9824020>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136331 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 04:45:53 +00:00
NAKAMURA Takumi
e1adf8177f
test/CodeGen/struct-init.c, struct-matching-constraint.c: Tweak commandline, or they would not be recognized as armv7 on some hosts.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136330 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 03:53:54 +00:00