Граф коммитов

5739 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar b94ffa4a64 clang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
directly and one can write '-includefoo' if one really wants to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 10:01:26 +00:00
John McCall 842aef8d94 First pass at implementing C++ enum semantics: calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to.  This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 09:09:27 +00:00
Douglas Gregor 43c79c2b07 Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:47:37 +00:00
Fariborz Jahanian 92ef5d7572 More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:09:15 +00:00
Anders Carlsson 7cdc25edb6 Make the BugType.h header self-contained so Daniel will stop bugging me ;)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90887 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 22:16:41 +00:00
Daniel Dunbar 87667aafe6 Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 19:49:51 +00:00
John McCall dbd872f273 DeclRefExpr stores a ValueDecl internally.
Template instantiation can re-use DeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 09:08:17 +00:00
John McCall 604e7f14d6 Correctly implement the C++03 and 0x restrictions on class-member using
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 07:46:18 +00:00
John McCall e8174bc483 Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 07:42:38 +00:00
Douglas Gregor ba03dfddc3 Remove dead diagnostics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:36:01 +00:00
Eli Friedman 265f52e920 Get rid of some diagnostics that don't follow our rules for -pedantic
diagnostics (specifically, that any extension in a compiler-reserved namespace
shouldn't trigger a diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:22:26 +00:00
Jeffrey Yasskin e3fdca2ee0 Remove several .c_str() to be forward-compatible with StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:46:24 +00:00
John McCall 812c15476c Recover from dot accesses to record pointers and arrow accesses to records.
Patch by Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:46:59 +00:00
Ted Kremenek fc576514d0 Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:06:12 +00:00
Ted Kremenek 67d1287035 Add analysis support for blocks. This includes a few key changes:
- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
- VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
- Add transfer function support to GRExprEngine for BlockDeclRefExprs.

This change also supports analyzing blocks as an analysis entry point
(top-of-the-stack), which required pushing more context-sensitivity
around in the MemRegion hierarchy via the use of LocationContext
objects.  Functionally almost everything is the same, except we track
LocationContexts in a few more areas and StackSpaceRegions now refer
to a StackFrameContext object.  In the future we will need to modify
MemRegionManager to allow multiple StackSpaceRegions in flight at once
(for the analysis of multiple stack frames).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90809 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:05:27 +00:00
Rafael Espindola 7ca7987669 Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:28:29 +00:00
Douglas Gregor 9a0c85e640 Code completion for Objective-C @ keywords that are statements or expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:51:25 +00:00
Douglas Gregor c464ae8444 Code completion for Objective-C @ directives
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:27:33 +00:00
Zhongxing Xu 935ef90f4b Add EvalCallExpr interface to checker, and migrate the no-return function
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some 
default checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:17:35 +00:00
Anders Carlsson b13e357dac getTemplateSpecializationKind should be const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 06:33:48 +00:00
Anders Carlsson f53df2398e Move key functions to a separate map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 04:35:11 +00:00
John McCall a93c934af4 DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:54:59 +00:00
Chris Lattner c08582ba5e add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
pointed out by Charles Davis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 02:09:14 +00:00
Chris Lattner 4664649183 reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 01:36:53 +00:00
Sam Weinig 19a9edb5dd Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 23:57:56 +00:00
Chris Lattner 1ade4ca0aa revert my previous patch, it is breaking something and I don't have time
to fix it ATM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 20:58:07 +00:00
Eli Friedman d7d7f67c1d Move helper onto CXXMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 20:50:05 +00:00
Chris Lattner a564b17dcc implement PR4451, improving error recovery for a mistaken : where a :: was
intended.  On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
 ^
 ::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
 ^
 ;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
          ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 19:08:11 +00:00
Daniel Dunbar bb3503a146 Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 09:56:30 +00:00
Daniel Dunbar 2ffb14f004 Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.
Also, update SourceManager.h doxyments for getBuffer() to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 09:19:25 +00:00
Daniel Dunbar 63ceaa32a2 Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 09:19:12 +00:00
Steve Naroff 0304c6cb7f Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).
Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 12:23:07 +00:00
Steve Naroff e0c4d895ff Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=71086

Note - This commit only includes the fix for:

<rdar://problem/6309338> slightly different error message format for Visual Studio.

The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 02:14:08 +00:00
John McCall ed97649e95 Fix "using typename" and the instantiation of non-dependent using declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:46:56 +00:00
Anders Carlsson 9936908144 Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:34:07 +00:00
Mike Stump be0ed67bc7 Add an easy accessor for the end of the try/catch statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:22:32 +00:00
Daniel Dunbar 8477ee93c9 Driver: Switch -ccc-* options to using the standard options functionality.
- I still want to get rid of them, but manually handling them isn't adding value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:55:23 +00:00
Daniel Dunbar 2658f05caf OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:08:40 +00:00
Daniel Dunbar 9a242512a8 OptParser: Add HelpHidden flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 21:08:25 +00:00
Ted Kremenek edeb5b6b50 Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 20:32:20 +00:00
Rafael Espindola 0f4c59c3be Add gcc's -no-canonical-prefixes option to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 19:31:58 +00:00
Daniel Dunbar f772d1e2a5 ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
from a source file.
 - This allows CIndex to avoid iterating over all the top-level decls when using
   a PCH, which means we deserialize far fewer decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 08:17:33 +00:00
Daniel Dunbar f13876fac1 Ignore -fsched-interblock and -freorder-blocks to the ignored -f flags, we have
no plans to support invasive optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 08:17:18 +00:00
Ted Kremenek bfb4fc9ebc Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:57:49 +00:00
Ted Kremenek 6dea404751 Revert r90546.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:47:41 +00:00
Eli Friedman f595cc41c4 Make the type of the Decl referred to by a MemberExpr a bit more precise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:40:45 +00:00
Zhongxing Xu 1d60710c59 the assertion says state is not NULL. When state is not NULL, getState()
returns state. So simplify the predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:36:49 +00:00
Ted Kremenek d02e83a548 Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:03:51 +00:00
Ted Kremenek 0ee4124012 Refactor LocationContext creation logic into a single member template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:28:56 +00:00
Ted Kremenek dc0d909f0f Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:50:10 +00:00
Eli Friedman 9aef7263d8 Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer.  Also, some minor cleanup and improvements to the
diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:30:06 +00:00
Ted Kremenek b48ad64a0e constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:26:31 +00:00
Ted Kremenek bcd7f9f8cb More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:05:57 +00:00
John McCall d001454000 Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
Make it an inner class of Parser to assuage access control.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 22:31:13 +00:00
Eli Friedman c013118155 Add recursion guards to ice-checking and evaluation for declrefs, so we
don't infinitely recurse for cases we can't evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 20:31:57 +00:00
Ted Kremenek d3d870b96d Convert some methods in PathDiagnostic to return StringRefs instead of std::string&.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:34:02 +00:00
Fariborz Jahanian e7184df728 A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:44:40 +00:00
Douglas Gregor 109ae73ec7 Minor cleanup to the code-completion-point logic suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:05:59 +00:00
Daniel Dunbar baac10380c Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:14:12 +00:00
Daniel Dunbar e7cb7e4570 Kill a few more random stderr uses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:14:02 +00:00
Daniel Dunbar 360435908c Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:13:30 +00:00
Daniel Dunbar 93ebb1ba9f Switch PCHReader::getOriginalSourceFile to use proper diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:13:06 +00:00
Daniel Dunbar 3be0d19503 Fix BackendConsumer to use proper diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:12:54 +00:00
Ted Kremenek 81cef58890 Make BlockDataRegion::referenced_vars_iterator an actual class that enforces that all MemRegions iterated over are VarRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 08:09:21 +00:00
Daniel Dunbar 8fd57fea85 Fix layering violation by moving Analysis/CallGraph to Index
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:20:04 +00:00
Daniel Dunbar 9b5e9ae08d clang-cc: Honor -help and -version when using new style option parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:01:58 +00:00
Daniel Dunbar b737fb12cb CC1Options: Normalize meta var spellings, and fix a few help texts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:01:46 +00:00
Daniel Dunbar 60e107fb86 Add OptTable::PrintHelp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:01:38 +00:00
Daniel Dunbar e14b5f5237 Add clang -cc1 support for -remap-file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 05:11:16 +00:00
Daniel Dunbar efba227cc5 Add clang -cc1 -load option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 05:11:05 +00:00
Ted Kremenek 81a9583668 Add batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple regions as once. After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 03:27:11 +00:00
Daniel Dunbar 8506dde586 Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
 - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New:  1.9038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:54:28 +00:00
Daniel Dunbar 5262fda30b Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:45:44 +00:00
John McCall fda8e12774 Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap).  Fix
an DeclContext lookup-table ordering problem which was causing UsingDecls to
show up incorrectly when looking for ordinary results.  And oh hey
Clang-Code-Syntax passes now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 00:58:24 +00:00
Sebastian Redl ccf43505db Introduce the notion of literal types, as specified in C++0x.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 00:13:20 +00:00
Douglas Gregor 802ab45fea Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 22:36:29 +00:00
Daniel Dunbar c7822dbf3c ASTUnit: Explicitly track whether the ASTUnit came from an actual AST or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 21:47:43 +00:00
Daniel Dunbar 68ea2ac7fd ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor UseBumpAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 21:47:32 +00:00
Mike Stump de05057932 Change rtti/Rtti to RTTI, as it is an acronym.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 18:57:08 +00:00
Douglas Gregor 057e567f1b Extend -remap-file=from;to to permit mapping from a non-existent
file. This is accomplished by introducing the notion of a "virtual"
file into the file manager, which provides a FileEntry* for a named
file whose size and modification time are known but which may not
exist on disk.

Added a cute little test that remaps both a .c file and a .h file it
includes to alternative files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 18:12:28 +00:00
Anders Carlsson 5ec02ae147 In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 17:15:43 +00:00
Douglas Gregor 735df88a38 Extend the CIndex code-completion API to perform code completion
involving unsaved files, using the -remap-file= functionality recently
added to clang-cc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90314 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 09:21:34 +00:00
John McCall 51fa86f738 r90313, in which OverloadedFunctionDecl is removed and never spoken of again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 08:47:38 +00:00
Daniel Dunbar 68d40e2d16 Fix ASTUnit::getOriginalSourceFileName() when using ASTUnit's derived from
source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 08:44:16 +00:00
Douglas Gregor 716f0b3e2e Introduce a new clang-cc option
-remap-file=from;to

which takes the file "from" and transparently replaces its contents
with the contents of the file "to" from the source manager's
perspective. This is the moral equivalent of

  cp from saved
  cp to from
  <call clang>
  cp saved from
  rm saved

without all of the pesky file copying.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 08:08:39 +00:00
John McCall 0bd6feb9e9 Push overloaded function templates through the parser using a totally different
leaked data structure than before.  This kills off the last remaining 
explicit uses of OverloadedFunctionDecl in Sema.                                         


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90306 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 08:04:21 +00:00
Douglas Gregor 2968442603 Extend the source manager with the ability to override the contents of
files with the contents of an arbitrary memory buffer. Use this new
functionality to drastically clean up the way in which we handle file
truncation for code-completion: all of the truncation/completion logic
is now encapsulated in the preprocessor where it belongs
(<rdar://problem/7434737>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 06:49:09 +00:00
Zhongxing Xu a46e4d91d8 Hard bifurcate the state into nil receiver and non-nil receiver, so that
we don't need to use the DoneEvaluation hack when check for 
ObjCMessageExpr.

PreVisitObjCMessageExpr() only checks for undefined receiver or arguments.

Add checker interface EvalNilReceiver(). This is a 'once-and-done' interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 05:49:12 +00:00
Douglas Gregor 4a160e16eb Eliminate the unnecessary FirstFID cache variable from the source manager's ContentCache
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 05:34:39 +00:00
Daniel Dunbar 7b55668db7 Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of
(clang/driver) command line arguments (including the source file).
 - The arguments are expected to include the source file.

 - The idea is that even though this is a somewhat odd API, its the form which
   many tools can most easily use (for example, by interposing with the compiler).

Also, switch index-test's -ast-from-source to use this entry point, and provide
a -arg command line argument which can be used to test that the command line
arguments are handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 03:23:45 +00:00
Daniel Dunbar daab7b1016 Driver: Add Command::Creator member variable, which tracks the tool that was
used to create a particular command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 03:23:25 +00:00
Chris Lattner 39d9841ed4 pass the reason for failure up from MemoryBuffer and report it
in diagnostics when we fail to open a file.  This allows us to
report things like:

$ clang test.c -I.
test.c:2:10: fatal error: error opening file './foo.h': Permission denied
#include "foo.h"
         ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:52:33 +00:00
Ted Kremenek 1488c7a098 The minimum element size in BumpVector should be 1, not 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:13:00 +00:00
John McCall aa81e1658d Rework how we support C++ implicit member accesses. If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate.  Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete.  This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:10:20 +00:00
Daniel Dunbar c4e265f67e Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 21:57:27 +00:00
Daniel Dunbar ec2a4ed278 Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader
to use it so it at least won't try to access Sema once it is gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 21:57:20 +00:00
Daniel Dunbar 32d4d80c26 Convert Diagnostic::getCustomDiagID to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:42:06 +00:00
Douglas Gregor 9af2f52fbc Don't automatically assume that an id-expression refers to a
ValueDecl, because that isn't always the case in ill-formed
code. Diagnose a common mistake (forgetting to provide a template
argument list for a class template, PR5655) and dyn_cast so that we
handle the general problem of referring to a non-value declaration
gracefully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 16:58:18 +00:00
Daniel Dunbar 521bf9c529 Add ASTUnit::LoadFromCompilerInvocation, which does what it says.
Also, add an -ast-from-source option to index-test which allows index-test to
run on source files directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 09:51:01 +00:00
Douglas Gregor 2b4074f1d3 Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 05:55:20 +00:00
Zhongxing Xu f99ce1e81f Clean up BuiltinBug class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 03:06:19 +00:00
Anders Carlsson 1a5e0d7f18 Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:41:22 +00:00
John McCall 129e2df52e Eliminate the use of OverloadedFunctionDecl in member expressions.
Create a new UnresolvedMemberExpr for these lookups.  Assorted hackery
around qualified member expressions;  this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 22:42:35 +00:00
Anders Carlsson 3790980841 When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 21:24:50 +00:00
Mike Stump 6515afe50c Add const to accessors that don't modify the object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 20:10:58 +00:00
Fariborz Jahanian 8d2c0a9814 Fix a crash when ivar type is a __strong SEL. Fallout from
recent change to make SEL a builtin type (fixes radar 7425510).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 18:43:52 +00:00
Benjamin Kramer bb377edda2 Use StringRef in Attr constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 17:08:26 +00:00
Daniel Dunbar 3b315264d1 Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too many) places to use this instead of using the backend -soft-float and -float-abi= options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:42:00 +00:00
Daniel Dunbar c238955f09 Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered diagnostics to a different diagnostics engine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:41:34 +00:00
Daniel Dunbar b33fbaa5f1 Eliminate CodeGenOptions::TimePasses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:39:52 +00:00
Daniel Dunbar 3636e1d784 Eliminate CodeGenOptions::SimplifyLibCalls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:39:32 +00:00
Chris Lattner 6e2901407b Fix PR5633 by making the preprocessor handle the case where we can
stat a file but where mmaping it fails.  In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'

instead of "cannot find file".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 04:18:44 +00:00
Daniel Dunbar 9e612408c2 clang -cc1: Use proper diagnostics for all parsing errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 21:52:53 +00:00
Daniel Dunbar e03245246a Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:58:50 +00:00
Daniel Dunbar 545c28117c Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:58:32 +00:00
Benjamin Kramer f0171732ef Port BugReporter and BugType to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 18:27:55 +00:00
Kovarththanan Rajaratnam 2024f4d4b0 Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 14:54:35 +00:00
Kovarththanan Rajaratnam f79bafa608 This patch moves the frontend timer from clang-cc into CompilerInstance.
CompilerInstance already contains various objects that are used
throughout the entire run.

Also addresses Daniels review comments in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091123/024508.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 09:57:35 +00:00
Daniel Dunbar ce6bf1ecda clang -cc1: Allow -triple= as an alias for -triple, -code-compiletion-at= as an alias for -code-completion-at, and spell "-std=" option correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 09:32:20 +00:00
Sean Hunt 3e518bda00 Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 07:34:05 +00:00
Daniel Dunbar f219e7c152 Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 07:18:39 +00:00
Daniel Dunbar 7674352cf3 clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:39:08 +00:00
Daniel Dunbar fb435102b1 Add missing accessors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:55 +00:00
Daniel Dunbar 1b0969590e Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:47 +00:00
Daniel Dunbar 7d065d0f21 Move MainFileName option variable into CodeGenOptions instead of LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 02:38:34 +00:00
Kovarththanan Rajaratnam 59c55e7249 This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:09:28 +00:00
Kovarththanan Rajaratnam 149594457d Cleanup llvm/Support/Compiler.h include in header files
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:08:10 +00:00
Benjamin Kramer 408ac1767a Missed a forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 12:08:44 +00:00
Benjamin Kramer 58652887b0 Cleanup includes and forward decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 10:50:44 +00:00
Sean Hunt 0486d74601 Add Parser support for C++0x literal operators ('operator "" i').
DeclarationName can't handle them yet, so right now Parser just errors out on them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 04:44:28 +00:00
Anders Carlsson 1fb7cf9214 Add an iterator for walking the primary base chain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 00:50:23 +00:00
Anders Carlsson 261fba6cf5 Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:14:40 +00:00
Anders Carlsson ce2009ab2f Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 22:05:05 +00:00
Daniel Dunbar 83d5a2a7d5 Fix typo, thanks Sebastian!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 08:26:07 +00:00
Ted Kremenek 4240096011 Add iterators to BlockDataRegion that allow clients to iterate over the VarRegions for "captured" variables for a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 02:34:36 +00:00
Ted Kremenek 9dce71ff2b Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 02:32:19 +00:00
Ted Kremenek b1a7b65231 Enhance LiveVariables to understand that blocks can extend the liveness of a variable by "capturing" them in a BlockExpr.
This required two changes:

1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.

2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 02:31:33 +00:00
Daniel Dunbar f51ac1b3d0 Factor out a LangStandard class and coalesce the information about the standards into LangStandards.def
- I'd appreciate another pair of eyeballs to double check this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 02:14:31 +00:00
Daniel Dunbar 0ff679f5dd Add clang -cc1 parsing for preprocessor options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 02:14:07 +00:00
Douglas Gregor 2afce7248b Refactor our handling of expression evaluation contexts, so that Sema
maintains a stack of evaluation contexts rather than having the parser
do it. This change made it simpler to track in which contexts
temporaries were created, so that we could...

"Forget" about temporaries created within unevaluated contexts, so
that we don't build a CXXExprWithTemporaries and, therefore, destroy
the integral-constness of our expressions. Fixes PR5609.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26 00:44:06 +00:00
Ted Kremenek 0a8112a78d Refine MemRegions for blocks. Add a new region called
'BlockDataRegion' to distinguish between the code associated with a
block (which is represented by 'BlockTextRegion') and an instance of a
block, which includes both code and data.  'BlockDataRegion' has an
associated LocationContext, which can be used to eventually model the
lifetime of a block object once LocationContexts can represent scopes
(and iterations around a loop, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 23:53:07 +00:00
Fariborz Jahanian 369a3bd997 Allow user re-definition of SEL as well as accessing its fields.
This fixes pr5611.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 23:07:42 +00:00
Douglas Gregor d85b5b9b8f Implement the rules in C++ [basic.link] and C99 6.2.2 for computing
the linkage of a declaration. Switch the lame (and completely wrong)
NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(),
along with the "can this declaration be a template argument?" check
that started all of this.

Fixes -fsyntax-only for PR5597.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 22:24:25 +00:00
Ted Kremenek 66078610be Add post-visit Checker support in GRExprEngine for BlockExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 22:23:25 +00:00
Ted Kremenek 32c4995826 Make RegisterInternalChecks() part of GRExprEngine's private implementation by making it a static function within GRExprEngine.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 21:51:20 +00:00
Douglas Gregor 51ffb0c9d4 Implement support for default template arguments of function templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 18:55:14 +00:00
Douglas Gregor 5b6d70e2de Diagnose ill-formed uses of default template arguments in
function templates (in C++98), friend function templates, and
out-of-line definitions of members of class templates.

Also handles merging of default template arguments from previous
declarations of function templates, for C++0x. However, we don't yet
make use of those default template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 17:50:39 +00:00
Daniel Dunbar cdd9686b89 What the FIXMEs want, the FIXMEs shall have.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 11:53:23 +00:00
Daniel Dunbar 3b84f5bab9 Add an arg_iterator, for iterating over a subset of arguments in an ArgList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 11:33:30 +00:00
Daniel Dunbar 6453f72b8d Add ParseSourceLocation::FromString, and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 10:14:44 +00:00
Kovarththanan Rajaratnam d23c447e4b This patch streamlines CheckerVisitor.def so that it follows the usual '#ifndef foo' pattern:
#ifndef foo
#define foo(parm1)
#endif

foo(parm1) parm1 ...

#undef foo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 08:37:20 +00:00
Sean Hunt 7725e67639 Parse C++ member check attributes - base_check, hiding, and override.
The attributes are currently ignored.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 04:20:27 +00:00
Zhongxing Xu bc6c676448 UndefResults is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 03:07:22 +00:00
Ted Kremenek c95ad9ff6e Add transfer function support for BlockExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 01:33:13 +00:00
Ted Kremenek eb1c7a0450 Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a precursor to having basic static analysis support for blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 01:32:22 +00:00
Fariborz Jahanian f88f7ab5ad Some fancy footwork to move the decision on how
to build casted expression-list AST to Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 01:26:41 +00:00
Douglas Gregor 3233441b43 Qualify the name of the llvm::cast template. I am somewhat amazed that GCC parsed this
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 00:38:36 +00:00
Douglas Gregor 99e9b4d172 Eliminate CXXConditionDeclExpr with extreme prejudice.
All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 00:27:52 +00:00
Sebastian Redl d1a7846699 Have the parser tell sema whether a member declaration is a function definition. This allows sema to not emit spurious diagnostics in some invalid code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 23:38:44 +00:00
Ted Kremenek fee96e0431 Cleanups and fixes to the nil-receiver checker, some of it fallout the
initial transition of the nil-receiver checker to the Checker
interface as done in r89745.  Some important changes include:

1) We consolidate the BugType object used for nil receiver bug
reports, and don't include the type of the returned value in the
BugType (which would be wrong if a nil receiver bug was reported more
than once)

2) Added a new (temporary) flag to CheckerContext: DoneEvauating.
This is used by GRExprEngine when evaluating message expressions to
not continue evaluating the message expression if this flag is set.
This flag is currently set by the nil receiver checker.  This is an
intermediate solution to allow the nil-receiver checker to properly
work as a plug-in outside of GRExprEngine.  Basically, this flag
indicates that the entire message expression has been evaluated, not
just a precondition (which is what the nil-receiver checker does).
This flag *should not* be repurposed for general use, but just to pull
more things out of GRExprEngine that already in there as we devise a
better interface in the Checker class.

3) Cleaned up the logic in the nil-receiver checker, making the
control-flow a lot easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 21:41:28 +00:00
Douglas Gregor 5656e14d91 Clean up the AST for while loops and fix several problems with
cleanups for while loops: 

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

   while (shared_ptr<WorkInt> p = getWorkItem()) {
         // ...
         }

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

   while (blah)
     RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 21:15:44 +00:00
John McCall f7a1a744eb Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and
DependentScopeDeclRefExpr support storing templateids.  Unite the common   
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.

This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.

Also resolves a few FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 19:00:30 +00:00
John McCall 909e58988b DeclarationName::getIdentifier should take a const IdentifierInfo, since the
constructor does anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 18:44:29 +00:00
John McCall 80ad16f4b2 Helper function for turning a TemplateName into a DeclarationName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89782 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 18:42:40 +00:00
Sebastian Redl 46408eedff Make sure redeclaration chains are properly linked, even through invalid decls. This fixes PR5415.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 17:14:34 +00:00
Douglas Gregor d3d5301c44 Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 17:07:59 +00:00
Kovarththanan Rajaratnam 87392c4919 Remove trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 14:30:21 +00:00
Ken Dyck f5f514477d Add getByteSize() and getTypeSizeInBytes().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89760 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 12:04:54 +00:00
Zhongxing Xu 668399b23c Refactor undefined result checker. This is the last one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 08:24:26 +00:00
Zhongxing Xu 2055effed5 Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into
CallAndMessageChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 07:06:39 +00:00
Kovarththanan Rajaratnam 990a07c095 Remove trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 06:30:23 +00:00
Ted Kremenek e576af2754 Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 01:33:10 +00:00
Daniel Dunbar 33a33d8abd Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 00:54:16 +00:00
Douglas Gregor 8cfe5a7841 Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 23:44:04 +00:00
Daniel Dunbar 21affc0897 Add clang -cc1 parsing of diagnostic options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 23:41:17 +00:00
Ted Kremenek 19d67b52b7 Clean up the Checker API a little more, resolving some hidden bugs
along the way.  Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions.  This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag.  Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time.  This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases.  We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly.  This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 22:22:01 +00:00
Anders Carlsson bc0e0781da Handle converting member pointers to bool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 20:04:44 +00:00
Fariborz Jahanian a79f8b3989 Fix a recent regression probably caused by addition of altivec-style
type-casts in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 19:51:43 +00:00
Ted Kremenek c6e11fff76 Provide out-of-line definition for destructor of Checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 18:53:03 +00:00
Sebastian Redl 5d484e8cf7 Intercept sizeof and alignof references before they get into ASTContext methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 17:18:46 +00:00
Sebastian Redl eb0d8c95b4 Let using directives refer to namespace aliases. Fixes PR5479.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 15:34:23 +00:00
Douglas Gregor f21bac6408 Require a class type to be complete before probing its conversion
functions for a switch condition's conversion to integral or
enumeration type. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 13:53:21 +00:00
Douglas Gregor 84fb9c0be6 Implement conversion from a switch condition with class type to an
integral or enumeration type (vi user-defined conversions). Fixes PR5518.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 13:46:08 +00:00
Douglas Gregor 3ebd753991 Tolerate extraneous "template<>" headers better, downgrading the
complaint to a warning and providing a helpful node in the case where
the "template<>" header is redundant because the corresponding
template-id refers to an explicit specialization. C++0x might still
change this behavior, and existing practice is all over the place on
the number of "template<>" headers actually needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 12:11:45 +00:00
Douglas Gregor 0da76df921 Centralize and complete the computation of value- and type-dependence for DeclRefExprs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 11:41:28 +00:00
Zhongxing Xu 0835e4cccf Initial refactor of UndefBranchChecker. We still use GRBranchNodeBuilder
in the checker directly. But I don't have a better approach for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 03:20:54 +00:00
John McCall d5532b6cff Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into
a new class.  Use it pervasively throughout Sema.

My fingers hurt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 01:53:49 +00:00
Daniel Dunbar e2814d8902 Add clang -cc1 parsing of analyzer options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 22:08:20 +00:00
Zhongxing Xu f605aae322 Save and restore the HasGen flag in MallocChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 13:22:34 +00:00
Zhongxing Xu c3372e0ee8 Remove UndefinedAssignmentChecker's header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 12:29:52 +00:00
John McCall 7453ed4cb2 Consider a FunctionTemplate to be an overload all on its lonesome. Track
this information through lookup rather than rederiving it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 00:44:51 +00:00
Fariborz Jahanian 13dcd00615 This patch implements objective-c's 'SEL' type as a built-in
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025). 
There are couple of remaining issues that I would like for
Ted. and Doug to look at:

Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.

Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 19:53:08 +00:00
Sean Hunt 37ac7990a6 Fix 80-cols violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 09:45:54 +00:00
Daniel Dunbar c52365674b Add 1+2 consts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 09:05:59 +00:00
John McCall ba13543329 "Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl().  Replace  
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of   
a function template in the lookup results.  

Incidentally fixes a problem with argument-dependent lookup where we were 
still performing ADL even when the lookup results contained something from
a block scope.  

Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.

The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 08:51:07 +00:00
Sean Hunt bbd37c62e3 Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
 - align() - semantics believed to be conformant to n3000, except for
   redeclarations and what entities it may apply to
 - final - semantics believed to be conformant to CWG issue 817's proposed
   wording, except for redeclarations
 - noreturn - semantics believed to be conformant to n3000, except for
   redeclarations
 - carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 08:43:09 +00:00
Douglas Gregor 98440b4ac1 Implement C++ [temp.param]p2 correctly, looking ahead when we see a
"typename" parameter to distinguish between non-type and type template
parameters. Fixes the actual bug in PR5559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 02:07:55 +00:00
Ted Kremenek c79d7d49c5 Pull BadCallChecker int UndefinedArgChecker, and have UndefinedArgChecker also handled undefined receivers in message expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 01:25:37 +00:00
Edward O'Callaghan 9cf910efc4 Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:49:54 +00:00
Ted Kremenek 64fa858556 More checker refactoring. Passing undefined values in a message expression is now handled by UndefinedArgChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:49:41 +00:00