Commit Graph

13147 Commits

Author SHA1 Message Date
Eli Friedman 678d3bac03 Targets without long long should reduce the size of intmax_t
accordingly.

llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Eli Friedman ce7f900b3b Refactor address-of-void extension a bit so that it's more obviously
correct.  No functionality change, as far as I know.

llvm-svn: 71965
2009-05-16 23:27:50 +00:00
Eli Friedman c3dcdd0980 A few minor updates to the user manual.
llvm-svn: 71964
2009-05-16 23:17:30 +00:00
Anders Carlsson 7bf3c4227d Fix another case where the extern-ness of extern "C" wasn't being captured.
This makes me think that we should make hasExternalStorage perform this check...

llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Anders Carlsson 5b53576fe4 Don't return member pointer types for static member functions. Fixes 6879261.
llvm-svn: 71961
2009-05-16 21:43:42 +00:00
Eli Friedman b529b01985 PR3942: Don't warn on unsigned overflow in preprocessor expressions.
llvm-svn: 71960
2009-05-16 21:24:10 +00:00
Anders Carlsson d3a69ceaaf extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson 524d5a4f5a Improve checking of member expressions where the base type is a dependent type.
llvm-svn: 71956
2009-05-16 20:31:20 +00:00
Daniel Dunbar f39ea8535b Update test case; I'm confused why this wasn't failing on the buildbot
though?

llvm-svn: 71955
2009-05-16 19:30:01 +00:00
Sebastian Redl 45be55d181 Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
llvm-svn: 71954
2009-05-16 18:59:35 +00:00
Sebastian Redl e769ecf8ab Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.
llvm-svn: 71953
2009-05-16 18:50:46 +00:00
Eli Friedman 4f8b8ed2ac Missing change for r71941 (PR2044).
llvm-svn: 71947
2009-05-16 13:58:00 +00:00
Eli Friedman 168fe15b0d Avoid calling mergeTypes in C++. I think these are the correct C++
alternatives, but please correct me if I'm wrong.

I eventually plan to assert in mergeTypes that we aren't in C++ mode 
because composite types are fundamentally not a part of C++. The 
remaining callers for code in the regression tests are 
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.

llvm-svn: 71946
2009-05-16 13:54:38 +00:00
Eli Friedman e2cad65015 Add stricter checking for va_arg.
llvm-svn: 71942
2009-05-16 12:46:54 +00:00
Eli Friedman 54135838e2 PR2044: reject declarations of functions returning variably modified
types.

llvm-svn: 71941
2009-05-16 12:15:55 +00:00
Eli Friedman 0b4af8f755 PR3009: Get rid of bogus warning for scalar compound literals.
This patch isn't quite ideal in that it eliminates the warning for 
constructs like "int a = {1};", where the braces are in fact redundant.  
However, that would have required a bunch of refactoring, and it's 
much less likely to cause confusion compared to redundant nested braces.

llvm-svn: 71939
2009-05-16 11:45:48 +00:00
Mike Stump 18bb9284ff Reflow some comments.
llvm-svn: 71937
2009-05-16 07:57:57 +00:00
Mike Stump 87c57acfb7 Reflow some comments.
llvm-svn: 71936
2009-05-16 07:39:55 +00:00
Mike Stump 6814d1c126 Implement a FIXME, we now pass in the locations of the braces for enums.
llvm-svn: 71930
2009-05-16 07:06:02 +00:00
Ted Kremenek f0d3237474 Update checker build.
llvm-svn: 71929
2009-05-16 06:05:27 +00:00
Eli Friedman b05c41e0a1 Remove useless wrapper.
llvm-svn: 71928
2009-05-16 05:56:02 +00:00
Mike Stump b9075ae9f7 Fixup __extension__ i = 1 parsing. Thanks Eli!
llvm-svn: 71927
2009-05-16 04:31:34 +00:00
Ted Kremenek e4302ee3bb Fix: <rdar://problem/6893565> False positive: don't flag leaks for return types that cannot be determined to be CF types
llvm-svn: 71921
2009-05-16 01:38:01 +00:00
Ted Kremenek a28565ac62 Fix another bug in BugReporter where we wouldn't always select the bug report in a bug equivalence class with the shortest path.
llvm-svn: 71920
2009-05-16 01:11:58 +00:00
Douglas Gregor 30776d419f Template instantiation for IndirectGotoStmt. Now my life is complete.
llvm-svn: 71917
2009-05-16 00:20:29 +00:00
Douglas Gregor 2a2d00f041 Template instantiation for switch statements
llvm-svn: 71916
2009-05-15 23:57:33 +00:00
Fariborz Jahanian 6404c420e5 Removed superfluous code.
llvm-svn: 71909
2009-05-15 23:19:35 +00:00
Fariborz Jahanian 4447e17c03 Early support for __format__attribute on blocks.
Work in progress...

llvm-svn: 71908
2009-05-15 23:15:03 +00:00
Anders Carlsson 789e2cce54 Basic support for member exprs where the base expr type is dependent.
llvm-svn: 71907
2009-05-15 23:10:19 +00:00
Daniel Dunbar 9a017d7fcf Classes with "+load" methods need to go in the non-lazy class list (or
else the method will not be found by the runtime at class load time).

llvm-svn: 71904
2009-05-15 22:33:15 +00:00
Douglas Gregor ca60224bbe Template instantiation for break and continue statements.
llvm-svn: 71903
2009-05-15 22:32:39 +00:00
Douglas Gregor e5cc0f3288 Introduce the EXPR macro into StmtNodes.def, so that we can
distinguish between expression and statement nodes. No functionality
change.

llvm-svn: 71902
2009-05-15 22:19:30 +00:00
Douglas Gregor 5d13868263 Template instantiation for "for" loops
llvm-svn: 71901
2009-05-15 22:12:32 +00:00
Ted Kremenek 926dffce01 Update checker build.
llvm-svn: 71900
2009-05-15 21:56:27 +00:00
Douglas Gregor 3daa82dba0 Template instantiation for do-while statements.
llvm-svn: 71899
2009-05-15 21:56:04 +00:00
Daniel Dunbar 19573e7d29 Factor code for adding module-level class lists into separate method.
- No functionality change.

llvm-svn: 71898
2009-05-15 21:48:48 +00:00
Mike Stump 76b824c388 Fixup parsing for (throw,throw) and __extension__ throw 1.
llvm-svn: 71897
2009-05-15 21:47:08 +00:00
Douglas Gregor 8a930c3b73 Template instantiation for WhileStmt and CXXConditionDeclExpr.
llvm-svn: 71896
2009-05-15 21:45:53 +00:00
Douglas Gregor 8d2ad873e7 Make sure that we use the canonical type for the names of instantiated
constructors and destructors. This is a requirement of
DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing,
so it should have been caught much earlier :(

Big thanks to Anders for the test case.

llvm-svn: 71895
2009-05-15 21:18:27 +00:00
Fariborz Jahanian 6802ed9968 improved on diagnosing misplacement of sentinel attributes.
No change in functionality.

llvm-svn: 71894
2009-05-15 21:18:04 +00:00
Ted Kremenek eef7a21507 Add hack to scan-build to fix PR 4215
(http://llvm.org/bugs/show_bug.cgi?id=4215): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.

llvm-svn: 71891
2009-05-15 21:14:16 +00:00
Fariborz Jahanian 5e15186c9a added -fblocks to the test.
llvm-svn: 71890
2009-05-15 20:49:33 +00:00
Douglas Gregor 3f17b47c7e Allow instantiation of NULL expressions and statements
llvm-svn: 71889
2009-05-15 20:47:12 +00:00
Fariborz Jahanian 0aa5c4565d This patch finishes off the sentinel attribute handling for
blocks and function pointers.

llvm-svn: 71888
2009-05-15 20:33:25 +00:00
Anders Carlsson 2cf4387931 I take it back, InstantiateExpr does not check for null.
llvm-svn: 71887
2009-05-15 20:29:28 +00:00
Anders Carlsson 1f911dce22 Instantiation support for 'this'
llvm-svn: 71886
2009-05-15 20:26:03 +00:00
Anders Carlsson 50574f5303 No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.
llvm-svn: 71885
2009-05-15 20:10:48 +00:00
Anders Carlsson 2101e68398 Add SemaTemplateInstantiateStmt.cpp to Xcode project.
llvm-svn: 71884
2009-05-15 20:08:59 +00:00
Douglas Gregor 1ec5e9f025 Make sure that the type associated with a class template is dependent.
llvm-svn: 71878
2009-05-15 19:11:46 +00:00
Douglas Gregor 9d73cabf22 Template instantiation for "if" statements. Also:
- Skip semantic analysis of the "if" condition if it is type-dependent.
  - Added the location of the "else" keyword into IfStmt, so that we can
    provide it for type-checking after template instantiation.

llvm-svn: 71875
2009-05-15 18:53:42 +00:00