Commit Graph

59897 Commits

Author SHA1 Message Date
Ted Kremenek a3d4d7b4fa Update checker build.
llvm-svn: 71874
2009-05-15 18:40:51 +00:00
Anders Carlsson 37604a0984 A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).
llvm-svn: 71873
2009-05-15 18:35:39 +00:00
Douglas Gregor 82049e6bdd Move statement instantiation into its own file. No functionality change
llvm-svn: 71872
2009-05-15 18:22:25 +00:00
Jay Foad e609ab00a5 Work around the fact that GNU libstdc++'s debug mode uses RTTI.
llvm-svn: 71871
2009-05-15 18:13:31 +00:00
Douglas Gregor 12c3a5cedf When word-wrapping, be more defensive about a ridiculously small number of columns. Fixes <rdar://problem/6892178>
llvm-svn: 71870
2009-05-15 18:05:24 +00:00
Douglas Gregor 67da0d97e6 Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template.

llvm-svn: 71869
2009-05-15 17:59:04 +00:00
Anders Carlsson f6e9ece507 Name mangling for class template specializations and template arguments.
llvm-svn: 71861
2009-05-15 16:09:15 +00:00
Chris Lattner 4579b76ff6 Fix processing of -Ufoo to not inject "#undef foo 1" into the predefines
buffer.  This caused exciting nonsense like this:

$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
             ^
             //
1 diagnostic generated.

rdar://6891800

llvm-svn: 71860
2009-05-15 16:08:43 +00:00
Ted Kremenek 3281977dbb Fix crash when deriving the enclosing summary of a method whose first selector slot has a null IdentifierInfo*. This happens when analyzing Growl.
llvm-svn: 71857
2009-05-15 15:49:00 +00:00
Anton Korobeynikov dae2d9a852 Unbreak mingw build
llvm-svn: 71856
2009-05-15 11:04:52 +00:00
Owen Anderson e61a56f6f3 Improve compatibility with older versions of Windows.
llvm-svn: 71855
2009-05-15 10:40:23 +00:00
Bill Wendling 2f921f82e4 Split out the DwarfDebug module from the DwarfWriter module.
Again, no intendtional functionality change.

llvm-svn: 71854
2009-05-15 09:23:25 +00:00
Owen Anderson 0e4b4929fc Factor out some common code, fix more typoes, and add a memory fence that might be needed.
llvm-svn: 71853
2009-05-15 08:22:07 +00:00
Owen Anderson 2e38cb19a4 Fix an unfortunate typo.
llvm-svn: 71852
2009-05-15 08:07:23 +00:00
Bill Wendling 1c5fd604b3 Mark class as hidden.
llvm-svn: 71850
2009-05-15 06:55:26 +00:00
Owen Anderson dc17f4fe62 (Hopefully) unbreak Apple-style builds.
llvm-svn: 71849
2009-05-15 06:49:31 +00:00
Evan Cheng e23c109a67 Fix PR4210. Rewritter should track and update kills of sub-registers as well.
llvm-svn: 71848
2009-05-15 06:48:19 +00:00
Ted Kremenek 4785e41c12 Remove extra whitespace character in string literal. Purely cosmetic.
llvm-svn: 71847
2009-05-15 06:02:08 +00:00
Ted Kremenek 2aab87f393 Update checker build.
llvm-svn: 71846
2009-05-15 05:59:34 +00:00
Ted Kremenek 3d436c7b35 Use dyn_cast instead of cast to allow our assumptions to be safely wrong.
llvm-svn: 71843
2009-05-15 05:34:49 +00:00
Ted Kremenek 608a6176a1 Cleanup internal checks bug reporting, allowing intermediate diagnostics to be generated for bad argument warnings, bad branches, etc.
llvm-svn: 71838
2009-05-15 05:25:09 +00:00
Owen Anderson c9cbd86cfa Don't #include OSAtomic.h unless we really need it.
llvm-svn: 71837
2009-05-15 05:13:57 +00:00
Ted Kremenek 46727df06a Re-enable passing analyzer options from scan-build to ccc-analyzer.
llvm-svn: 71836
2009-05-15 04:20:31 +00:00
Ted Kremenek f9903da7fa Don't strip quotes in compiler line for -D arguments.
Fixes PR 4205.

llvm-svn: 71835
2009-05-15 04:07:18 +00:00
Nick Lewycky 942982278c Fix warning.
llvm-svn: 71834
2009-05-15 03:07:14 +00:00
Nick Lewycky d449e7c8c6 Add extra parenthesis around || statements to pacify compiler.
Also fix up some 80col violations while I'm there.

llvm-svn: 71833
2009-05-15 03:03:14 +00:00
Ted Kremenek 73777059f0 BugReporter (extensive diagnostics): Do not include the range of target '}'
llvm-svn: 71832
2009-05-15 02:46:13 +00:00
Ted Kremenek 18665fe3c9 PathDiagnosticLocation::asRange(): for a PathDiagnosticLocation, the range of a DeclStmt is only the decl, not
the decl + initializer.

llvm-svn: 71831
2009-05-15 02:05:25 +00:00
Ted Kremenek cfe7d02b2c BugReporter (extensive diagnostics): Add control-flow piece to '}' in
loop body when generating 'Looping back to the head of the loop'
diagnostics.

llvm-svn: 71829
2009-05-15 01:50:15 +00:00
Bill Wendling dd20b98c35 Move c'tor/d'tor to top of file.
llvm-svn: 71828
2009-05-15 01:18:50 +00:00
Bill Wendling d64cd2bb6e Split out the DwarfException class into its own file. No functionality change,
though the classes have been marked with "VISIBILITY_HIDDEN".

llvm-svn: 71827
2009-05-15 01:12:28 +00:00
Anders Carlsson 19b8c4ce36 Instantiate return statements.
llvm-svn: 71825
2009-05-15 00:48:27 +00:00
Mike Stump 2c002929b2 Fixup debug information for the location information for __block
variables.  For this to work, the backend needs to handle more complex
forms for locations.

A typical utterance would be:

        %forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1               ; <i8**> [#uses=1]
        %0 = load i8** %forwarding              ; <i8*> [#uses=1]
        %1 = bitcast i8* %0 to %0*              ; <%0*> [#uses=1]
        %x = getelementptr %0* %1, i32 0, i32 4         ; <i32*> [#uses=1]
        %2 = bitcast i32* %x to { }*            ; <{ }*> [#uses=1]
        call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))

Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete.  Radar 6867696

llvm-svn: 71824
2009-05-15 00:29:54 +00:00
Anders Carlsson 03b0dd5913 Add NullStmt::Clone and use it
llvm-svn: 71823
2009-05-15 00:21:21 +00:00
Anders Carlsson f42de874b3 Instantiate goto and label statements. (Very useful, I know)
llvm-svn: 71822
2009-05-15 00:15:26 +00:00
Bill Wendling 47054f3d57 Split out the Dwarf writer stuff into separate files. This is a much more
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.

Trivia: It *looks* like there would be functionality changes, however there aren't!
llvm-svn: 71821
2009-05-15 00:11:17 +00:00
Anders Carlsson ee209a6501 Add SemaTemplateInstantiateExpr.cpp to Xcode project.
llvm-svn: 71820
2009-05-15 00:10:12 +00:00
Owen Anderson 509bb7423e Now with working on Leopard!
llvm-svn: 71819
2009-05-15 00:01:40 +00:00
Douglas Gregor 923feac4e2 Implement template instantiation for DeclStmt
llvm-svn: 71818
2009-05-15 00:01:03 +00:00
Fariborz Jahanian 0c20bddc41 Don't warn if result/argument type of an implemented
method is a qualified id which conforms to the matching type
of its method declaration.

llvm-svn: 71817
2009-05-14 23:52:54 +00:00
Douglas Gregor 0555e5fbce Template instantiation for the NULL statement. Lame, I know
llvm-svn: 71816
2009-05-14 23:40:54 +00:00
David Greene 3587eed2c4 Implement !if, analogous to $(if) in GNU make.
llvm-svn: 71815
2009-05-14 23:26:46 +00:00
Douglas Gregor b4850465b7 Introduce basic support for instantiating the definitions of member
functions of class templates. Only compound statements and expression
statements are currently implemented.

llvm-svn: 71814
2009-05-14 23:26:13 +00:00
Mike Stump 35ea2c9aa6 Reflow to fit 80-col.
llvm-svn: 71813
2009-05-14 23:23:37 +00:00
Mike Stump 13e4f10c53 Reflow to fit 80-col.
llvm-svn: 71812
2009-05-14 23:22:47 +00:00
David Greene 9bb2de17c2 Fix tests to not upset DejaGNU.
llvm-svn: 71811
2009-05-14 23:21:40 +00:00
David Greene d571b3c94b Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.
Ok, not really, but do support some common LISP functions:

* car
* cdr
* null

llvm-svn: 71805
2009-05-14 22:38:31 +00:00
David Greene e917fff30f Implement a !foreach operator analogous to GNU make's $(foreach).
Use it on dags and lists like this:

class decls {
  string name;
}

def Decls : decls;

class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;

llvm-svn: 71803
2009-05-14 22:23:47 +00:00
Anders Carlsson 0a7c01ff2b Check that the function being overridden is virtual.
llvm-svn: 71802
2009-05-14 22:15:41 +00:00
David Greene 98ed3c7273 Implement a !subst operation simmilar to $(subst) in GNU make to do
def/var/string substitution on generic pattern templates.  For example:

def Type;
def v4f32 : Type;
def TYPE : Type;

class GenType<Type t> {
  let type = !(subst TYPE, v4f32, t);
}

def TheType : GenType<TYPE>;

llvm-svn: 71801
2009-05-14 21:54:42 +00:00