Commit Graph

7770 Commits

Author SHA1 Message Date
Fariborz Jahanian 57251782d0 Code gen for aggregate-valued properties and a test case.
llvm-svn: 60122
2008-11-26 22:36:09 +00:00
Argyrios Kyrtzidis 0c4162a659 Add some comments.
llvm-svn: 60119
2008-11-26 21:51:07 +00:00
Argyrios Kyrtzidis ace521a1e1 Implement some suggestions by Daniel:
-Change Parser::ParseCXXScopeSpecifier to MaybeParseCXXScopeSpecifier
-Remove Parser::isTokenCXXScopeSpecifier and fold it into MaybeParseCXXScopeSpecifier
-Rename Parser::TryAnnotateScopeToken to TryAnnotateCXXScopeToken and only allow it to be called when in C++

llvm-svn: 60117
2008-11-26 21:41:52 +00:00
Argyrios Kyrtzidis 041f958303 Add an overload for operator<<(const DiagnosticBuilder &DB,bool I).
Fixes building error on MSVC where passing bool couldn't resolve to one of the overloads.

llvm-svn: 60116
2008-11-26 20:39:45 +00:00
Fariborz Jahanian e7167c28f6 Removed a FIXME. Added a test case for anonymous category.
llvm-svn: 60115
2008-11-26 20:33:54 +00:00
Fariborz Jahanian f8ef9f3dc9 Set default property attributes on each property.
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in 
propgress.

llvm-svn: 60114
2008-11-26 20:01:34 +00:00
Anders Carlsson f7a9a92359 Convert incomplete array types before emitting debug info for them, fixes PR3134.
llvm-svn: 60109
2008-11-26 17:40:42 +00:00
Nuno Lopes 8c6fbc04ee add missing RUN lines
llvm-svn: 60107
2008-11-26 15:50:12 +00:00
Douglas Gregor 08d96d5182 Fix a minor typo in the handling of the conditional operator for Objective-C interface pointers
llvm-svn: 60096
2008-11-26 06:43:45 +00:00
Douglas Gregor a60a6914cc Tweak the new ResolveOverloadedCallFn to just return a FunctionDecl. It makes ActOnCallExpr simpler
llvm-svn: 60094
2008-11-26 06:01:48 +00:00
Douglas Gregor 99dcbff154 Move the overloading logic of Sema::ActOnCallExpr to a separate function
llvm-svn: 60093
2008-11-26 05:54:23 +00:00
Zhongxing Xu 21148402d6 Add plugin loading for clang. This will be used to load alternative constraint manager for static analysis.
llvm-svn: 60091
2008-11-26 05:23:17 +00:00
Devang Patel c6fab4f50f Disable -loop-index-split for now.
llvm-svn: 60089
2008-11-26 05:01:52 +00:00
Ted Kremenek bf2d60145d Re-apply r60071 now that raw_fd_ostream::tell has been committed.
llvm-svn: 60086
2008-11-26 03:36:26 +00:00
Daniel Dunbar 3ea9485335 Revert 60071, depends on uncommitted LLVM changes.
llvm-svn: 60077
2008-11-26 02:18:33 +00:00
Ted Kremenek 22d4b885fd Migrate token-cache generation logic from dummy harness in PPLexerChange.cpp to CacheTokens.cpp.
llvm-svn: 60071
2008-11-26 00:57:55 +00:00
Ted Kremenek e6847594ef Add setter method PreprocessorLexer::setParsingPreprocessorDirective(). This will be used by the mechanism to generate cached tokens.
llvm-svn: 60070
2008-11-26 00:57:02 +00:00
Nuno Lopes 615f34c719 remove debug-only assertion in the complex float evaluator as it makes some real apps crash
llvm-svn: 60069
2008-11-26 00:39:53 +00:00
Daniel Dunbar 762e77b55f Only call TryAnnotateScopeToken when parsing C++.
- This improves -parse-noop of Carbon.h by +2%, and I believe
   compensates for the majority of the performance regression in r58913.

llvm-svn: 60063
2008-11-25 23:05:24 +00:00
Anders Carlsson 32ef8ceaa1 Handle returning complex types that get coerced. Fixes PR3131
llvm-svn: 60058
2008-11-25 22:21:48 +00:00
Sebastian Redl 511ed55524 Use RAII objects to ensure proper destruction of expression and statement AST nodes in the parser in most cases, even on error.
llvm-svn: 60057
2008-11-25 22:21:31 +00:00
Daniel Dunbar 44b58a2c14 Fix 80-col violations.
llvm-svn: 60051
2008-11-25 21:53:21 +00:00
Fariborz Jahanian 829b908b74 Refactored checking on readonly property into a method.
llvm-svn: 60050
2008-11-25 21:48:26 +00:00
Fariborz Jahanian 9a207ee4dc Patch to allow over-riding of readonly property to
a writable property in one of its category.

llvm-svn: 60035
2008-11-25 17:56:43 +00:00
Anders Carlsson 28a423f42e Remove more #ifdeffed code
llvm-svn: 60033
2008-11-25 17:16:39 +00:00
Anders Carlsson 9f77f60620 Remove the #ifdeffed out code.
llvm-svn: 60032
2008-11-25 17:10:10 +00:00
Nuno Lopes 6cdcbd1f95 add note about running the test suite with valgrind
llvm-svn: 60029
2008-11-25 15:46:06 +00:00
Nuno Lopes a1232e5d7f remove unused var
llvm-svn: 60018
2008-11-25 12:23:46 +00:00
Douglas Gregor 3ff3cf5f21 Test another error message, make sure to verify C++ new and delete tests
llvm-svn: 60007
2008-11-25 04:08:05 +00:00
Douglas Gregor 2afd0be069 Simple parsing of exception specifications, with no semantic analysis yet
llvm-svn: 60005
2008-11-25 03:22:00 +00:00
Zhongxing Xu f39268ae8c Add documentation for test.
llvm-svn: 60002
2008-11-25 01:45:11 +00:00
Daniel Dunbar 5c4cc09498 Comment fix.
llvm-svn: 59997
2008-11-25 00:20:22 +00:00
Zhongxing Xu 2939a50b67 Add no-warning to test case.
llvm-svn: 59995
2008-11-24 23:45:56 +00:00
Fariborz Jahanian 8fc3741b76 Patch to remove bogus waring when a property declaration
is imported from a protocol into the implementation.

llvm-svn: 59988
2008-11-24 22:16:00 +00:00
Sebastian Redl 198a5838df Remove an empty if and add a reminder for when we implement C++ try-catch.
llvm-svn: 59987
2008-11-24 21:45:59 +00:00
Ted Kremenek 3ca000af83 Display the function we are analyzing before running LiveVariables.
llvm-svn: 59983
2008-11-24 20:53:32 +00:00
Ted Kremenek e03879b8ad Fix CFG bug where the 'increment' block for a 'for' statement would not be
properly reversed once constructed.

This fixes PR 3125:

http://llvm.org/bugs/show_bug.cgi?id=3125

llvm-svn: 59982
2008-11-24 20:50:24 +00:00
Sebastian Redl 849b1e6ac7 Remove some bad characters from comment.
llvm-svn: 59979
2008-11-24 20:06:50 +00:00
Sebastian Redl f7cb84d771 Fix the fix of revision 59974. Now array-struct.c passes too.
llvm-svn: 59975
2008-11-24 19:39:40 +00:00
Sebastian Redl 81c1e1306c Fix crash of array bounds checking under 64-bit.
There might be other, similar bugs lurking there.

llvm-svn: 59974
2008-11-24 19:35:33 +00:00
Ted Kremenek 01c414c070 Remove FIXME comment.
llvm-svn: 59973
2008-11-24 19:27:06 +00:00
Zhongxing Xu 9165ed69af Add support for AllocaRegion extent with GDM.
One design problem that is emerging is the signed-ness problem during static
analysis. Many unsigned value have to be converted into signed value because
it partipates in operations with signed values. 

On the other hand, we cannot blindly make all values occuring in static analysis
signed, because we do have cases where unsignedness is required, for example,
integer overflow detection.

llvm-svn: 59957
2008-11-24 09:44:56 +00:00
Zhongxing Xu 1dffa8cd73 Add utility methods.
llvm-svn: 59956
2008-11-24 09:38:21 +00:00
Zhongxing Xu f1b4ff28a7 Fix 80-col violation.
llvm-svn: 59954
2008-11-24 07:38:01 +00:00
Zhongxing Xu 6587c75488 Cleanup code with utility method.
llvm-svn: 59951
2008-11-24 07:02:06 +00:00
Chris Lattner 1e5665e6be Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first.  This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.

llvm-svn: 59948
2008-11-24 06:25:27 +00:00
Chris Lattner f3d3faeca6 Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName().  This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.

llvm-svn: 59947
2008-11-24 05:29:24 +00:00
Anders Carlsson a7c5eb72a0 Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832.
llvm-svn: 59946
2008-11-24 05:23:59 +00:00
Anders Carlsson 4fb8a9c6b6 __builtin_constant_p takes an argument that can have any type.
llvm-svn: 59944
2008-11-24 05:23:12 +00:00
Zhongxing Xu f556cd6cb9 Strings are NULL terminated. So the region size should plus one.
llvm-svn: 59943
2008-11-24 05:16:01 +00:00