Ted Kremenek
750028b6f4
Use CrashRecoveryContextCleanup objects to release resources associated with Sema during a crash while parsing.
...
llvm-svn: 127850
2011-03-18 02:06:53 +00:00
Ken Dyck
a1b35109cf
Convert alignment values to CharUnits. No change in functionality intended.
...
llvm-svn: 127848
2011-03-18 01:26:17 +00:00
Ken Dyck
33fa9ee4fd
Convert getSizeInBytes() to getSizeInChars(), which returns its result in
...
CharUnits. No change in functionality intended.
llvm-svn: 127846
2011-03-18 01:12:13 +00:00
Ken Dyck
4e54dcaca1
Convert variables to CharUnits in ConvertStructToPacked(). No change in
...
functionality intended.
llvm-svn: 127844
2011-03-18 00:55:06 +00:00
Daniel Dunbar
c44f8cf7b8
Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
...
disable Obj-C exceptions.
llvm-svn: 127836
2011-03-17 23:28:31 +00:00
Daniel Dunbar
033a4bc49e
Driver/Darwin: These are command line options, not target features.
...
llvm-svn: 127820
2011-03-17 18:29:04 +00:00
Daniel Dunbar
1d733e2d7e
Driver/Darwin: Suppress spurious warning about -force_cpusubtype_ALL.
...
llvm-svn: 127819
2011-03-17 17:37:29 +00:00
Daniel Dunbar
c9388c11f1
Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.
...
llvm-svn: 127815
2011-03-17 17:10:06 +00:00
Richard Smith
9647d3ca02
Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does.
...
Also fix an issue where type source information for the resulting type was being lost.
llvm-svn: 127811
2011-03-17 16:11:59 +00:00
David Chisnall
a9e5460f03
Remove code that was intentionally generating bad code on the GNU runtime for no reason (failing to emit .cxx_constructor / .cxx_destructor methods).
...
llvm-svn: 127806
2011-03-17 14:19:08 +00:00
Ted Kremenek
2551fbe928
Don't construct two CFGs just to run -Wuninitialized. While this causes new warnings to be flagged under -Wconditional-uninitialized, this is something we
...
can improve over time.
llvm-svn: 127802
2011-03-17 05:29:57 +00:00
Ted Kremenek
70727343cf
Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
...
llvm-svn: 127798
2011-03-17 04:10:25 +00:00
Ted Kremenek
6fa1daede5
Teach VariadicMethodTypeChecker that CF references are valid arguments to variadic Objective-C methods.
...
llvm-svn: 127797
2011-03-17 04:01:35 +00:00
Ted Kremenek
3e5ad5932e
Tweak RegionStore's handling of lazy compound values to use the 'Default' versus 'Direct' binding key, thus allowing specific elements of an array/struct to be overwritten without
...
invalidating the entire binding. Fixes PR 9455.
llvm-svn: 127796
2011-03-17 03:51:51 +00:00
Ted Kremenek
c15a4e4b37
Extend -Wuninitialized to support vector types.
...
llvm-svn: 127794
2011-03-17 03:06:11 +00:00
Ken Dyck
db205d1828
Convert NextOffsetInBytes to CharUnits and rename to NextOffsetInChars. No
...
change in functionality intended.
llvm-svn: 127787
2011-03-17 01:33:18 +00:00
Matt Beaumont-Gay
145e2eb0e3
Politely inform GCC that we will never fall off the end of that switch.
...
llvm-svn: 127783
2011-03-17 00:46:34 +00:00
Daniel Dunbar
b1db4b69cc
Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
...
not being consistent at all with other parts of the GCC implementation.
llvm-svn: 127777
2011-03-17 00:07:34 +00:00
Joerg Sonnenberger
bdbdf70334
Use C as fallback type if in C preprocessor mode.
...
llvm-svn: 127769
2011-03-16 22:45:02 +00:00
Eli Friedman
b6069255da
PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.
...
llvm-svn: 127768
2011-03-16 22:34:09 +00:00
Abramo Bagnara
9875a3ce70
Use ElaboratedType also for C.
...
llvm-svn: 127755
2011-03-16 20:16:18 +00:00
Douglas Gregor
63fab34469
Detect attempts to provide a specialization of a function within a
...
dependent scope and produce an error (rather than crashing). Fixes PR8979.
llvm-svn: 127749
2011-03-16 19:27:09 +00:00
Argyrios Kyrtzidis
d6278e3252
Having FileManager::getFile always open the file, brought much consternation and leaking of file descriptors.
...
Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it
false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters.
Fixes rdar://9139899.
llvm-svn: 127748
2011-03-16 19:17:25 +00:00
Douglas Gregor
89f3cd5c15
Clean up our handling of template-ids that resolve down to a single
...
overload, so that we actually do the resolution for full expressions
and emit more consistent, useful diagnostics. Also fixes an IRGen
crasher, where Sema wouldn't diagnose a resolvable bound member
function template-id used in a full-expression (<rdar://problem/9108698>).
llvm-svn: 127747
2011-03-16 19:16:25 +00:00
Sandeep Patel
5a4a0f75d4
Fix duplicate argument processing
...
llvm-svn: 127746
2011-03-16 19:14:34 +00:00
Peter Collingbourne
7d8a0b52d4
Support for printing/dumping static asserts
...
llvm-svn: 127744
2011-03-16 18:37:27 +00:00
Chandler Carruth
3cc331a160
Add a 'RawPath' parameter to the PPCallbacks interface. This allows
...
clients to observe the exact path through which an #included file was
located. This is very useful when trying to record and replay inclusion
operations without it beind influenced by the aggressive caching done
inside the FileManager to avoid redundant system calls and filesystem
operations.
The work to compute and return this is only done in the presence of
callbacks, so it should have no effect on normal compilation.
Patch by Manuel Klimek.
llvm-svn: 127742
2011-03-16 18:34:36 +00:00
Douglas Gregor
ce0bc31469
Don't indescriminately print overload candidates when we have invalid
...
operands to a binary expression; it doesn't make sense in all
contexts. The right answer would be to see if the user forgot at ().
Fixes <rdar://problem/9136502>.
llvm-svn: 127740
2011-03-16 18:21:05 +00:00
Douglas Gregor
6341ceedc5
Allow function calls to dereferenced member pointers of
...
pointer-to-function type. Fixes <rdar://problem/9065289>.
llvm-svn: 127739
2011-03-16 17:42:23 +00:00
Douglas Gregor
a0ff0c34a7
Make sure that we always pop a function's scope *before* we call
...
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.
Fixes PR9495.
llvm-svn: 127738
2011-03-16 17:05:57 +00:00
Douglas Gregor
46c04e74fb
When we're inserting a synthesized label declaration for a
...
forward-looking "goto" statement, make sure to insert it *after* the
last declaration in the identifier resolver's declaration chain that
is either outside of the function/block/method's scope or that is
declared in that function/block/method's specific scope. Previously,
we could end up inserting the label ahead of declarations in inner
scopes, confusing C++ name lookup.
Fixes PR9491/<rdar://problem/9140426> and <rdar://problem/9135994>.
Note that the crash-on-invalid PR9495 is *not* fixed. That's a
separate issue.
llvm-svn: 127737
2011-03-16 16:39:03 +00:00
David Chisnall
803adc1bcf
Fix foreign exception handling (GNU runtime).
...
llvm-svn: 127736
2011-03-16 15:44:28 +00:00
Abramo Bagnara
22f8cd7117
Added missing methods to get Designators source range.
...
llvm-svn: 127735
2011-03-16 15:08:46 +00:00
Ted Kremenek
35c70f64db
Teach CFGBuilder that the 'default' branch of a switch statement is dead if all enum values in a switch conditioned are handled.
...
llvm-svn: 127727
2011-03-16 04:32:01 +00:00
John McCall
e99e5dcbd3
Don't emit read barriers for reading __weak __block variables
...
in non-GC mode.
llvm-svn: 127725
2011-03-16 02:53:38 +00:00
Ted Kremenek
4ceebbf54d
VariadicMethodTypeChecker: don't warn for null pointer constants passed to variadic Objective-C methods.
...
llvm-svn: 127719
2011-03-16 00:22:51 +00:00
Ted Kremenek
6cd0187718
Remove warning for null characters in CFString literals. Clang handles them just fine, and GCC 4.2 doesn't warn here either.
...
We added this warning back in 2007 when we were comparing against GCC 4.0.
llvm-svn: 127704
2011-03-15 21:18:52 +00:00
Ted Kremenek
0d5b9ef564
Don't warn about null characters in Objective-C format string literals.
...
llvm-svn: 127703
2011-03-15 21:18:48 +00:00
John McCall
2de87f67e5
Reorganize the emission of (unfoldable) constant casts a bit, and
...
make sure that upcasts of member pointer types are covered as constants.
Fixed rdar://problem/9130221
llvm-svn: 127702
2011-03-15 21:17:48 +00:00
Sebastian Redl
c17003c66b
Create __has_feature(cxx_noexcept) and mark it as working.
...
Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented.
This completes noexcept specification work.
llvm-svn: 127701
2011-03-15 21:17:12 +00:00
Sebastian Redl
c34c29f661
More robust check for the special C++0x operator new workaround.
...
llvm-svn: 127692
2011-03-15 20:41:09 +00:00
Sebastian Redl
cb5dd00796
Implement a hack to work around the changing exception specification of operator new in C++0x.
...
llvm-svn: 127688
2011-03-15 19:52:30 +00:00
Ted Kremenek
cdb2ae587a
Remove bogus assertion in IdempotentOperationsChecker.
...
llvm-svn: 127687
2011-03-15 19:27:57 +00:00
Sebastian Redl
0b94c9fb69
Reintroduce r127617: "Code generation for noexcept." with fixes.
...
llvm-svn: 127685
2011-03-15 18:42:48 +00:00
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
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
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
Abramo Bagnara
29c2d46786
Fixed InnerLocStart.
...
llvm-svn: 127330
2011-03-09 14:09:51 +00:00
John McCall
85915250c0
Remove a rather egregious use of getFunctionInfo.
...
llvm-svn: 127324
2011-03-09 08:39:33 +00:00
John McCall
46288eff24
Fix three of the four places where I left breadcrumbs to avoid unnecessary
...
recomputation.
llvm-svn: 127322
2011-03-09 08:12:35 +00:00
John McCall
5fe009660d
Tame this assert, hopefully fixing self-host.
...
llvm-svn: 127319
2011-03-09 07:12:35 +00:00
Anders Carlsson
1f13bb5f00
When deserializing CXXBaseSpecifiers (and offsets), make sure to walk the chain in the correct order.
...
llvm-svn: 127315
2011-03-09 05:09:32 +00:00
John McCall
a738c25f5e
Use the "undergoes default argument promotion" bit on parameters to
...
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.
llvm-svn: 127314
2011-03-09 04:27:21 +00:00
John McCall
6a014d5c30
Add a bit to ParmVarDecl indicating whether the parameter undergoes
...
K&R-style default argument promotion.
llvm-svn: 127313
2011-03-09 04:22:44 +00:00
Ted Kremenek
2f1f023283
#include Store.h into BasicValueFactory.cpp to provide definitions of StoreRef constructor.
...
llvm-svn: 127291
2011-03-08 23:39:37 +00:00
Argyrios Kyrtzidis
97d3a38c3e
Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
...
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.
Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.
llvm-svn: 127289
2011-03-08 23:35:24 +00:00
Ted Kremenek
4bb6c6b37e
static analyzer: Fix use-after-free bug in RegionStore involving LazyCompoundValueData not reference counting Store objects.
...
llvm-svn: 127288
2011-03-08 23:18:00 +00:00
Abramo Bagnara
6111db9e9c
Fixed isEmbeddedInDeclarator flag loading.
...
llvm-svn: 127285
2011-03-08 22:33:38 +00:00
Anders Carlsson
3c50aea73f
Make the Objective-C checker look for subclasses of NSString instead of just NSString and NSMutableString.
...
llvm-svn: 127268
2011-03-08 20:05:26 +00:00
Douglas Gregor
95d3e370f4
Clarify the context in which an Objective-C type name is being parsed
...
by using an enumeration rather than a boolean value. No functionality
change.
llvm-svn: 127259
2011-03-08 19:17:54 +00:00
Fariborz Jahanian
08891f5249
Warn on usage of unavailable objc 'class' in
...
varienty of cases. // rdar://9092208
llvm-svn: 127257
2011-03-08 19:12:46 +00:00
Douglas Gregor
f2f0806f71
Teach libclang's token-annotation logic about context-sensitive
...
keywords for Objective-C+ and C++0x.
llvm-svn: 127253
2011-03-08 17:10:18 +00:00
Abramo Bagnara
ea94788cf4
Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.
...
llvm-svn: 127251
2011-03-08 16:41:52 +00:00
Anders Carlsson
a426705cc6
When writing file references in a pch, make sure to ask the file manager for the absolute path.
...
llvm-svn: 127248
2011-03-08 16:04:35 +00:00
Abramo Bagnara
b5545be14b
Fixed NamespaceDecl source range.
...
llvm-svn: 127242
2011-03-08 12:38:20 +00:00
NAKAMURA Takumi
2b7eeb2b4b
lib/Basic/Targets.cpp: mingw-w64 should define __MINGW32__, too.
...
llvm-svn: 127238
2011-03-08 12:06:46 +00:00
Abramo Bagnara
20c9e24241
Fixed bitfields source range.
...
llvm-svn: 127237
2011-03-08 11:07:11 +00:00
John McCall
5c8f6c47c4
Emit block capture initializers as if they were normal initializers for a local
...
variable that just happens to be stored in a wierd place.
llvm-svn: 127235
2011-03-08 09:38:48 +00:00
John McCall
91ca10fe64
Extract a function to emit an arbitrary expression as if it were the initializer
...
for a local variable.
llvm-svn: 127227
2011-03-08 09:11:50 +00:00
Abramo Bagnara
dff1930bf7
Fixed source range for all DeclaratorDecl's.
...
llvm-svn: 127225
2011-03-08 08:55:46 +00:00
John Wiegley
b4a9e51342
Removed trailing whitespace as a test commit
...
llvm-svn: 127223
2011-03-08 08:13:22 +00:00
John McCall
462c055d85
Fix my earlier commit to work with escaped newlines and leave breadcrumbs
...
in case we want to make a world where we can check intermediate instantiations
for this kind of breadcrumb.
llvm-svn: 127221
2011-03-08 07:59:04 +00:00
John McCall
ed14ad24e0
objc_gc wants a pointer type, not a function type; give it a more appropriate
...
diagnostic. Also, these attributes are commonly written with macros which we
actually pre-define, so instead of expanding the macro location, refer to the
instantiation location and name it using the macro loc.
llvm-svn: 127219
2011-03-08 04:17:03 +00:00
John McCall
97c250405b
Update the check for a NULL macro to use Preprocessor::getSpelling().
...
llvm-svn: 127217
2011-03-08 04:07:54 +00:00
John McCall
cff9bcfbd3
Add an API call to retrieve the spelling data of a token from its SourceLocation.
...
llvm-svn: 127216
2011-03-08 04:06:57 +00:00
Douglas Gregor
6203d49b0e
Detect attempts to provide a specialization of a function within a
...
dependent scope and produce an error (rather than crashing). Fixes PR8979.
llvm-svn: 127206
2011-03-08 02:04:14 +00:00
Bill Wendling
ec9d2633f1
When we adjust the inline ASM type, we need to take into account an early
...
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.
llvm-svn: 127185
2011-03-07 22:47:14 +00:00