Commit Graph

72956 Commits

Author SHA1 Message Date
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
Dale Johannesen 979ac9fce4 Test for llvm-gcc checkin 89898.
llvm-svn: 89899
2009-11-25 23:50:09 +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
Devang Patel 4da997b936 Update to reflect recent debugging information encoding changes.
llvm-svn: 89896
2009-11-25 23:28:01 +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
Viktor Kutuzov 8981b3abe5 Rollback changes r89516: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
llvm-svn: 89893
2009-11-25 22:44:18 +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
Evan Cheng 44df27e964 ProcessImplicitDefs should watch out for invalidated iterator and extra implicit operands on copies.
llvm-svn: 89880
2009-11-25 21:13:39 +00:00
Bob Wilson 4419301d81 Tail duplicate indirect branches for PowerPC, too.
With the testcase for pr3120, the "threaded interpreter" runtime decreases
from 1788 to 1413 with this change.

llvm-svn: 89877
2009-11-25 19:57:14 +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
Benjamin Kramer 4cd30817d3 Avoid some possibly unsafe uses of StringRef::data().
llvm-svn: 89873
2009-11-25 18:26:09 +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
Devang Patel 2d9caf9fe5 Use StringRef (again) in DebugInfo interface.
llvm-svn: 89866
2009-11-25 17:36:49 +00:00
Bob Wilson 120f729eca Based on the testcase for pr3120, running on my MacPro with Xeon processors,
it is definitely profitable to tail duplicate indirect branches for x86.
This is likely to be true to various degrees for all modern x86 processors.

llvm-svn: 89865
2009-11-25 17:27:53 +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
Bruno Cardoso Lopes 2db07581b7 Support PIC loading of constant pool entries
llvm-svn: 89863
2009-11-25 12:17:58 +00:00
Edward O'Callaghan 87e82ced60 Adjust comments to new semantics.
llvm-svn: 89862
2009-11-25 12:00:34 +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
Daniel Dunbar 900f2ce31c Sketch structure for X86 disassembler.
llvm-svn: 89850
2009-11-25 06:53:08 +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
Edward O'Callaghan 746782dde5 API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
llvm-svn: 89848
2009-11-25 06:32:19 +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 7baad7365a Perform explicit instantiations in the proper namespace, since Clang diagnoses this ill-formity.
llvm-svn: 89846
2009-11-25 06:04:18 +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
Edward O'Callaghan 2b8fed15e0 Reverting patch in revision 89758, initial attempt at fixing PR5373 has proven to be bogus.
llvm-svn: 89844
2009-11-25 05:38:41 +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