Daniel Dunbar
2c11cd156e
Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.
...
llvm-svn: 90119
2009-11-30 08:40:34 +00:00
Daniel Dunbar
8e70505692
Eliminate CodeGenOptions::TimePasses.
...
llvm-svn: 90118
2009-11-30 08:39:52 +00:00
Daniel Dunbar
de18224d9c
Eliminate CodeGenOptions::SimplifyLibCalls.
...
llvm-svn: 90117
2009-11-30 08:39:32 +00:00
Daniel Dunbar
fe994279ad
Simplify.
...
llvm-svn: 90115
2009-11-30 07:18:20 +00:00
Daniel Dunbar
1c39f3c89d
Put CompilerInvocation testing code in clang-cc instead of clang for now, I can't bear to link all of clang into 'clang' yet. :)
...
- Still triggered by a magic leading -cc1 argument, as before.
llvm-svn: 90114
2009-11-30 07:18:13 +00:00
Chris Lattner
710bb87147
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".
llvm-svn: 90110
2009-11-30 04:18:44 +00:00
Eli Friedman
03aa2f1262
Minor cleanup (no functionality change).
...
llvm-svn: 90105
2009-11-30 01:19:33 +00:00
Daniel Dunbar
0ac66427a9
clang -cc1: Use proper diagnostics for all parsing errors.
...
llvm-svn: 90100
2009-11-29 21:52:53 +00:00
Daniel Dunbar
c76493a65d
Don't pass false (default) for isVolatile parameter to CreateLoad.
...
llvm-svn: 90098
2009-11-29 21:23:36 +00:00
Daniel Dunbar
1dd0164bbe
Explicitly use setVolatile instead of extra IRBuilder argument.
...
llvm-svn: 90095
2009-11-29 21:11:47 +00:00
Daniel Dunbar
dacbe6bdcd
Don't pass false (default) for isVolatile parameter to CreateStore.
...
llvm-svn: 90094
2009-11-29 21:11:41 +00:00
Daniel Dunbar
fcb9caa772
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.
llvm-svn: 90092
2009-11-29 20:58:50 +00:00
Daniel Dunbar
ecd0444e8c
Simplify.
...
llvm-svn: 90091
2009-11-29 20:58:39 +00:00
Daniel Dunbar
65ca1c6f02
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.
...
llvm-svn: 90090
2009-11-29 20:58:32 +00:00
Benjamin Kramer
b33a97c384
Remove useless c_str() calls in SemaCodeComplete.
...
llvm-svn: 90088
2009-11-29 20:18:50 +00:00
Benjamin Kramer
ba9fd986eb
Simplify code. No functionality change.
...
llvm-svn: 90087
2009-11-29 19:51:45 +00:00
Benjamin Kramer
6341553c93
Port BugReporter and BugType to StringRef.
...
llvm-svn: 90086
2009-11-29 18:27:55 +00:00
Benjamin Kramer
ff3750f306
Kill some unnecessary calls to c_str().
...
llvm-svn: 90084
2009-11-29 18:03:28 +00:00
Kovarththanan Rajaratnam
d6ee467473
Kill off clang/win32 which contains the hand generated Visual Studio project files. These files are severely out of date and have been superseded by the CMake build system. RIP.
...
llvm-svn: 90081
2009-11-29 17:13:54 +00:00
Nuno Lopes
0e5d13e025
remove stall comment
...
llvm-svn: 90080
2009-11-29 17:07:16 +00:00
Kovarththanan Rajaratnam
130f7f9629
Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change.
...
llvm-svn: 90078
2009-11-29 14:54:35 +00:00
Kovarththanan Rajaratnam
09282c91d9
Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place.
...
llvm-svn: 90077
2009-11-29 14:50:29 +00:00
Kovarththanan Rajaratnam
5505dff8af
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
llvm-svn: 90073
2009-11-29 09:57:35 +00:00
Daniel Dunbar
e97582406b
Use '-FOO' 'BAR' instead of '-FOO=BAR' for FOO in -stack-protector, -fvisibility, and -fconstant-string-class.
...
llvm-svn: 90072
2009-11-29 09:33:20 +00:00
Daniel Dunbar
4e7596cc3a
Normalize options to use '-FOO' instead of '--FOO'.
...
llvm-svn: 90071
2009-11-29 09:33:10 +00:00
Daniel Dunbar
be95682389
Remove unnecessary -fblocks=0.
...
llvm-svn: 90070
2009-11-29 09:32:38 +00:00
Daniel Dunbar
f4a72b06c2
Use '-x' 'foo' instead of '-x=foo'.
...
llvm-svn: 90069
2009-11-29 09:32:31 +00:00
Daniel Dunbar
21749853bf
clang -cc1: Allow -triple= as an alias for -triple, -code-compiletion-at= as an alias for -code-completion-at, and spell "-std=" option correctly.
...
llvm-svn: 90068
2009-11-29 09:32:20 +00:00
Daniel Dunbar
a12113c789
Use '-o' '-' instead of '-o=-' in tests.
...
llvm-svn: 90067
2009-11-29 09:32:12 +00:00
Daniel Dunbar
7427fe28dc
Remove unnecessary -fms-extensions=0 from tests (this command line syntax is going away).
...
llvm-svn: 90066
2009-11-29 09:31:53 +00:00
Alexis Hunt
3d221f2fce
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.
llvm-svn: 90064
2009-11-29 07:34:05 +00:00
Daniel Dunbar
a1b02a2380
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.
...
llvm-svn: 90063
2009-11-29 07:18:39 +00:00
Ted Kremenek
8404b5485a
Update checker build.
...
llvm-svn: 90062
2009-11-29 06:48:25 +00:00
Ted Kremenek
33e88a7be7
Fix null dereference in UndefResultChecker identified by running the analyzer over Postgresql.
...
llvm-svn: 90060
2009-11-29 06:37:44 +00:00
Daniel Dunbar
0317c4c5b7
Add clang -cc1 parsing for LangOptions.
...
- This is the last major parsing piece, main FIXMEs remain.
llvm-svn: 90059
2009-11-29 05:52:21 +00:00
Daniel Dunbar
34c82c5695
clang-cc: Tweak LangOptions parsing to make it a bit more obvious what depends on what.
...
llvm-svn: 90058
2009-11-29 03:18:48 +00:00
Alexis Hunt
8818b42db0
Fix 80-cols violations
...
llvm-svn: 90057
2009-11-29 03:04:53 +00:00
Daniel Dunbar
5fe0866b9d
clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.
...
llvm-svn: 90054
2009-11-29 02:39:08 +00:00
Daniel Dunbar
6e227ca836
Add missing accessors.
...
llvm-svn: 90053
2009-11-29 02:38:55 +00:00
Daniel Dunbar
75fa84ebc6
Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.
...
llvm-svn: 90052
2009-11-29 02:38:47 +00:00
Daniel Dunbar
9eac065e67
Move MainFileName option variable into CodeGenOptions instead of LangOptions.
...
llvm-svn: 90051
2009-11-29 02:38:34 +00:00
Benjamin Kramer
337e3a5fea
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.
...
llvm-svn: 90044
2009-11-28 19:45:26 +00:00
Benjamin Kramer
26222b666c
Remove VISIBILITY_HIDDEN from lib/AST.
...
llvm-svn: 90043
2009-11-28 19:03:38 +00:00
Kovarththanan Rajaratnam
7632da4b8a
This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.
...
llvm-svn: 90042
2009-11-28 16:09:28 +00:00
Kovarththanan Rajaratnam
930de0aeaf
Cleanup llvm/Support/Compiler.h include in header files
...
llvm-svn: 90040
2009-11-28 16:08:10 +00:00
Nuno Lopes
baa1bc44af
cleanup parsing of MS integer suffixes a little. this fixes PR5616
...
btw, I believe that isMicrosoftInteger can go away; it's not read anywhere
llvm-svn: 90036
2009-11-28 13:37:52 +00:00
Benjamin Kramer
92096cb11f
Missed a forward declaration.
...
llvm-svn: 90035
2009-11-28 12:08:44 +00:00
Benjamin Kramer
4e75cd063f
Cleanup includes and forward decls.
...
llvm-svn: 90034
2009-11-28 10:50:44 +00:00
Benjamin Kramer
16634c2c5a
Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.
...
llvm-svn: 90033
2009-11-28 10:07:24 +00:00
Benjamin Kramer
435ef9b383
Remove unneeded includes.
...
llvm-svn: 90032
2009-11-28 09:41:31 +00:00
Kovarththanan Rajaratnam
b1034f7a24
Don't call exit(). llvm::llvm_report_error() will do just that
...
llvm-svn: 90031
2009-11-28 09:11:46 +00:00
Alexis Hunt
ed0530f694
Fix test and handle IK_LiteralOperatorId in a few more places.
...
llvm-svn: 90030
2009-11-28 08:58:14 +00:00
Kovarththanan Rajaratnam
15e9a9df83
Move program actions implications to clang::InitializeFrontendOptions which already contains such logic.
...
llvm-svn: 90029
2009-11-28 07:52:34 +00:00
Kovarththanan Rajaratnam
65c6566b5b
lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace
...
llvm-svn: 90028
2009-11-28 06:07:30 +00:00
Alexis Hunt
344585006c
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.
llvm-svn: 90027
2009-11-28 04:44:28 +00:00
Eli Friedman
c9e3e6ff29
Tests now pass with the assertion.
...
llvm-svn: 90026
2009-11-28 03:35:45 +00:00
Eli Friedman
78910a508a
Add a much more thorough test of casts to virtual bases, and fix
...
GetCXXBaseClassOffset to actually pass the test.
llvm-svn: 90025
2009-11-28 03:31:34 +00:00
Anders Carlsson
548cc9d143
We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.
...
llvm-svn: 90024
2009-11-28 03:03:52 +00:00
Anders Carlsson
182498df65
Add an iterator for walking the primary base chain.
...
llvm-svn: 90023
2009-11-28 00:50:23 +00:00
Anders Carlsson
d598850203
Move the vtable builder to an anonymous namespace.
...
llvm-svn: 90021
2009-11-27 22:21:51 +00:00
Anders Carlsson
a30c0d3ace
Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!
...
llvm-svn: 90020
2009-11-27 22:14:40 +00:00
Anders Carlsson
03ff379911
Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.
...
llvm-svn: 90018
2009-11-27 22:05:05 +00:00
Anders Carlsson
f942ee0297
Don't build the entire vtable when all we want is the index of a virtual method.
...
llvm-svn: 90017
2009-11-27 20:47:55 +00:00
Daniel Dunbar
c9bc8708d2
Fix typo, thanks Sebastian!
...
llvm-svn: 89999
2009-11-27 08:26:07 +00:00
Daniel Dunbar
cc0ba6a9d6
Simplify.
...
llvm-svn: 89998
2009-11-27 08:26:00 +00:00
Eli Friedman
2adc9abd51
Some member pointer casting tests.
...
llvm-svn: 89989
2009-11-27 04:56:40 +00:00
Eli Friedman
7eb0ccaa58
Add case for CK_DerivedToBaseMemberPointer cast kind to
...
AggExprEmitter::VisitCastExpr.
llvm-svn: 89988
2009-11-27 04:46:20 +00:00
Eli Friedman
e96f1d3b2f
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
...
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
llvm-svn: 89987
2009-11-27 04:41:50 +00:00
Eli Friedman
0dfc6804ff
Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.
...
llvm-svn: 89986
2009-11-27 02:07:44 +00:00
Eli Friedman
250534cf9a
Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
...
we check whether the vtable needs to be generated.
llvm-svn: 89984
2009-11-27 01:42:12 +00:00
Anders Carlsson
5a4f772bc8
Fix thinko.
...
llvm-svn: 89983
2009-11-27 01:26:58 +00:00
Anders Carlsson
859d7bf2f5
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors.
...
llvm-svn: 89967
2009-11-26 21:25:09 +00:00
Anders Carlsson
e985faea49
Correctly find overridden destructors.
...
llvm-svn: 89966
2009-11-26 20:50:40 +00:00
Anders Carlsson
323bb04ef4
Lazily create the __cxa_pure_virtual reference.
...
llvm-svn: 89965
2009-11-26 19:54:33 +00:00
Anders Carlsson
d420a31fe9
Use the new CovariantThunkAdjustment in the vtable builder.
...
Make the pure virtual methods map a set instead.
llvm-svn: 89961
2009-11-26 19:32:45 +00:00
Gabor Greif
d2add35d9d
typo
...
llvm-svn: 89949
2009-11-26 15:18:50 +00:00
Gabor Greif
40762fec73
issue a friendlier error if someone tries to send precompiled header to '-' (stdout)
...
this brings the error on
clang -c foo.h -o -
closer to
clang -c foo.h -o /dev/null
llvm-svn: 89948
2009-11-26 14:35:28 +00:00
Benjamin Kramer
334af99964
Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.
...
llvm-svn: 89947
2009-11-26 13:09:03 +00:00
Daniel Dunbar
7ab5c491c1
Remove header which is bringing libAST in (on MSVC).
...
llvm-svn: 89946
2009-11-26 09:57:25 +00:00
Eli Friedman
4907c6f2ed
Remove unused variable.
...
llvm-svn: 89945
2009-11-26 07:48:44 +00:00
Eli Friedman
ffc066f4b9
Shortcut explicit calls to a trivial copy assignment operator.
...
llvm-svn: 89944
2009-11-26 07:45:48 +00:00
Eli Friedman
84a7e347bf
Simplify and fix up the handling of implicit constructors, copy assignment
...
operators, and destructors. Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.
llvm-svn: 89943
2009-11-26 07:40:08 +00:00
Ted Kremenek
2350e0c3ba
Improve diagnostics in ReturnStackAddressChecker for returning a stack-allocated block. Implements the rest of <rdar://problem/7387385>.
...
llvm-svn: 89940
2009-11-26 07:14:50 +00:00
Ted Kremenek
e5d8dd808e
Add test case that shows that dead stores checking now works in the presence of blocks.
...
llvm-svn: 89939
2009-11-26 06:55:36 +00:00
Eli Friedman
d15eb34d4b
Implement IRGen for MemberExpr referring to static member function.
...
llvm-svn: 89938
2009-11-26 06:08:14 +00:00
Daniel Dunbar
0ec57ff203
Don't run the LLVM Code tests by default.
...
llvm-svn: 89937
2009-11-26 05:09:00 +00:00
Daniel Dunbar
9acb35a5e8
Add -Werror for Clang and LLVM on Clang (headers) syntax tests.
...
llvm-svn: 89936
2009-11-26 05:08:53 +00:00
Anders Carlsson
6d771bcd09
Add a Thunk struct to the vtable builder.
...
llvm-svn: 89935
2009-11-26 03:25:13 +00:00
Eli Friedman
cb422f1dbe
Use the more general Evaluate infrastructure for folding constant DeclRefs
...
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:
1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)
llvm-svn: 89934
2009-11-26 03:22:21 +00:00
Anders Carlsson
2f87c4f1a5
Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.
...
llvm-svn: 89933
2009-11-26 03:09:37 +00:00
Eli Friedman
f873c2fb68
Slight tweak to the algorithm for getLinkage().
...
llvm-svn: 89932
2009-11-26 03:04:01 +00:00
Eli Friedman
8a5f75ed5d
Use new getLinkage() method to correctly compute whether a variable has
...
internal linkage. Fixes PR5433.
llvm-svn: 89931
2009-11-26 02:52:12 +00:00
Anders Carlsson
abe274a8b0
Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.
...
llvm-svn: 89930
2009-11-26 02:49:32 +00:00
Ted Kremenek
f89dcdaf19
Add a PostVisitBlockExpr() method to RetainReleaseChecker to query for
...
the set of variables "captured" by a block. Until the analysis gets
more sophisticated, for now we stop the retain count tracking of any
objects (transitively) referenced by these variables.
llvm-svn: 89929
2009-11-26 02:38:19 +00:00
Ted Kremenek
94f8c4a7d5
Teach RegionStoreManager::RemoveDeadBindings() about BlockDataRegions. Any VarRegion for a "captured" variable should also be considered live.
...
llvm-svn: 89928
2009-11-26 02:35:42 +00:00
Ted Kremenek
3378b610ae
Add iterators to BlockDataRegion that allow clients to iterate over the VarRegions for "captured" variables for a block.
...
llvm-svn: 89927
2009-11-26 02:34:36 +00:00
Ted Kremenek
705fd953ef
Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.
...
llvm-svn: 89926
2009-11-26 02:32:19 +00:00
Anders Carlsson
c778540f9a
Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.
...
llvm-svn: 89925
2009-11-26 02:32:05 +00:00
Ted Kremenek
0f5e6f8805
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*.
llvm-svn: 89924
2009-11-26 02:31:33 +00:00
Douglas Gregor
20d58fbd3a
Add C++ tests to try to parse and compile the LLVM libraries
...
llvm-svn: 89923
2009-11-26 02:28:53 +00:00
Daniel Dunbar
e0d81f2237
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.
llvm-svn: 89919
2009-11-26 02:14:31 +00:00
Daniel Dunbar
5337f0c842
Fix thinko (-fno-builtin != -nobuiltininc).
...
llvm-svn: 89918
2009-11-26 02:14:16 +00:00
Daniel Dunbar
81fe60b787
Add clang -cc1 parsing for preprocessor options.
...
llvm-svn: 89917
2009-11-26 02:14:07 +00:00
Daniel Dunbar
cbc693579c
Add clang -cc1 parsing for header search options.
...
llvm-svn: 89916
2009-11-26 02:13:54 +00:00
Douglas Gregor
ff790f15c4
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.
llvm-svn: 89908
2009-11-26 00:44:06 +00:00
Ted Kremenek
1646cf6d05
Add missing case in switch statement.
...
llvm-svn: 89903
2009-11-25 23:58:21 +00:00
Ted Kremenek
b63ad7a6c1
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.).
llvm-svn: 89900
2009-11-25 23:53:07 +00:00
Ted Kremenek
80f70b54aa
Remove recently added FIXME. The appropriate FIXME is already in MemRegionManager::getVarRegion().
...
llvm-svn: 89897
2009-11-25 23:30:34 +00:00
Fariborz Jahanian
04b258cc9e
Allow user re-definition of SEL as well as accessing its fields.
...
This fixes pr5611.
llvm-svn: 89895
2009-11-25 23:07:42 +00:00
John Thompson
5bc5cbe2a2
Fix attribute between function decl ')' and '{' or '=0'
...
llvm-svn: 89894
2009-11-25 22:58:06 +00:00
Ted Kremenek
a3d6e62003
Add FIXME.
...
llvm-svn: 89892
2009-11-25 22:41:34 +00:00
Douglas Gregor
f73b282bf0
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.
llvm-svn: 89891
2009-11-25 22:24:25 +00:00
Ted Kremenek
e6929ffc21
Add post-visit Checker support in GRExprEngine for BlockExpr.
...
llvm-svn: 89890
2009-11-25 22:23:25 +00:00
Ted Kremenek
70a8788368
Add a new RetainReleaseChecker class (that subclasses CheckerVisitor) to extend the functionality of the retain/release checker using the new Checker interface. Pieces of CFRefCount will gradually be migrated to this new class over time.
...
llvm-svn: 89889
2009-11-25 22:17:44 +00:00
Ted Kremenek
945422794b
Move RegisterChecks() to the end of the file. No functionality change.
...
llvm-svn: 89888
2009-11-25 22:08:49 +00:00
Ted Kremenek
de820039b6
Call GRExprEngine::setTransferFunctions() after registering all Checkers. This allows GRTransferFuncs::RegisterChecks() to always be called after all checkers have been registered.
...
llvm-svn: 89887
2009-11-25 21:58:39 +00:00
Ted Kremenek
916061f613
Consolidate logic in ActionInlineCall by having it call ActionGRExprEngine instead of replicating most of its logic (and missing pieces).
...
llvm-svn: 89886
2009-11-25 21:55:23 +00:00
Fariborz Jahanian
f82ec6dd2f
Better diagnostic on deleted constructor when no
...
initializer name is available.
llvm-svn: 89885
2009-11-25 21:53:11 +00:00
Ted Kremenek
d0fe8047dd
Make RegisterInternalChecks() part of GRExprEngine's private implementation by making it a static function within GRExprEngine.cpp.
...
llvm-svn: 89884
2009-11-25 21:51:20 +00:00
Ted Kremenek
efb5003f95
Register internal checks with GRExprEngine when it is constructed, not manually in AnalysisConsumer.cpp.
...
llvm-svn: 89883
2009-11-25 21:45:48 +00:00
Ted Kremenek
acdc817ed9
When dispatching to Checker objects in GRExprEngine::CheckerVisit(),
...
only stop processing the checkers after all the nodes for a current
check have been processed. This (I believe) handles the case where
PredSet (the input nodes) contains more than one node due to state
bifurcation. Zhongxing: can you review this?
llvm-svn: 89882
2009-11-25 21:40:22 +00:00
Douglas Gregor
0bba2b6110
Tweak expected error to match what should happen, once using declarations work
...
llvm-svn: 89876
2009-11-25 19:28:08 +00:00
Douglas Gregor
3e5e960572
Tweak expected error message, although we still fail this test
...
llvm-svn: 89875
2009-11-25 19:25:39 +00:00
Douglas Gregor
5c80a27ba2
Implement support for default template arguments of function templates.
...
llvm-svn: 89874
2009-11-25 18:55:14 +00:00
Douglas Gregor
ed5731f68a
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.
llvm-svn: 89872
2009-11-25 17:50:39 +00:00
Devang Patel
58bf6e1885
Use StringRef (again) in DebugInfo interface.
...
llvm-svn: 89867
2009-11-25 17:37:31 +00:00
Douglas Gregor
7fdcbaf291
Fix a thinko where we weren't always performing unary conversions on the switch condition, fixing PR5612
...
llvm-svn: 89864
2009-11-25 15:17:36 +00:00
Daniel Dunbar
44b36ee78c
What the FIXMEs want, the FIXMEs shall have.
...
llvm-svn: 89861
2009-11-25 11:53:23 +00:00
Daniel Dunbar
b8c2f7d950
Add an arg_iterator, for iterating over a subset of arguments in an ArgList.
...
llvm-svn: 89860
2009-11-25 11:33:30 +00:00
Daniel Dunbar
b7f1babb73
Add a missing include <cstdio>
...
llvm-svn: 89859
2009-11-25 10:53:00 +00:00
Daniel Dunbar
750246255d
Fix some uses of fprintf/stderr without a prototype.
...
llvm-svn: 89858
2009-11-25 10:27:48 +00:00
Daniel Dunbar
ad2278d74c
Add clang -cc1 parsing for frontend options.
...
llvm-svn: 89856
2009-11-25 10:14:52 +00:00
Daniel Dunbar
8e72cc4a6e
Add ParseSourceLocation::FromString, and simplify.
...
llvm-svn: 89855
2009-11-25 10:14:44 +00:00
Daniel Dunbar
9efcf351bd
Add clang -cc1 parsing for preprocessor output options (-E).
...
llvm-svn: 89854
2009-11-25 10:14:37 +00:00
Daniel Dunbar
5bdd299bfd
Don't pass -fexceptions=0 (it is the default).
...
llvm-svn: 89853
2009-11-25 10:14:30 +00:00
Kovarththanan Rajaratnam
fe824d354a
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
llvm-svn: 89851
2009-11-25 08:37:20 +00:00
Edward O'Callaghan
c92791193d
Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.
...
llvm-svn: 89849
2009-11-25 06:33:27 +00:00
Douglas Gregor
3ff3af4ff9
When the condition of a switch() statement is semantically invalid,
...
still parse the body of the switch to try to avoid spurious
diagnostics. Fixes PR5606.
llvm-svn: 89847
2009-11-25 06:20:02 +00:00
Douglas Gregor
0681a35f5f
Don't crash when we re-use a template specialization node for an explicit instantiation. lib/Support/CommandLine.cpp is our test case
...
llvm-svn: 89845
2009-11-25 06:01:46 +00:00
Douglas Gregor
110755548b
Refactor ActOnFinishSwitchStmt to simplify it further
...
llvm-svn: 89843
2009-11-25 05:02:21 +00:00
Douglas Gregor
852d53e712
Refactor ActOnFinishSwitchStmt to simplify and reduce nesting
...
llvm-svn: 89842
2009-11-25 04:55:54 +00:00
Alexis Hunt
54a0254887
Parse C++ member check attributes - base_check, hiding, and override.
...
The attributes are currently ignored.
llvm-svn: 89837
2009-11-25 04:20:27 +00:00
Daniel Dunbar
ddeb7e09cb
Don't try to install .dir files.
...
llvm-svn: 89836
2009-11-25 03:46:30 +00:00
Anders Carlsson
82ba57c8f0
Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet).
...
llvm-svn: 89835
2009-11-25 03:15:49 +00:00
Zhongxing Xu
3931461a33
UndefResults is not needed.
...
llvm-svn: 89834
2009-11-25 03:07:22 +00:00
Douglas Gregor
3d9e90ae3e
Implement proper cleanup semantics for condition variables in for
...
statements, e.g.,
for(; X x = X(); ) { ... }
Daniel or Anders, please review!
llvm-svn: 89832
2009-11-25 01:51:31 +00:00
Ted Kremenek
e6a2780c96
Add really basic support for blocks in the retain/release checker. For now, anytime we pass a tracked object to a block call we stop tracking it.
...
llvm-svn: 89831
2009-11-25 01:35:18 +00:00
Ted Kremenek
470bfa47db
Allow building of CFGs for ASTs that contain BlockExprs.
...
llvm-svn: 89830
2009-11-25 01:34:30 +00:00
Ted Kremenek
cfe223f637
Add transfer function support for BlockExpr.
...
llvm-svn: 89829
2009-11-25 01:33:13 +00:00
Ted Kremenek
10a50e7371
Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a precursor to having basic static analysis support for blocks.
...
llvm-svn: 89828
2009-11-25 01:32:22 +00:00