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
Anders Carlsson
87da2b5dce
Forgot the newline :)
...
llvm-svn: 59942
2008-11-24 05:13:45 +00:00
Anders Carlsson
3abcb58a35
Add test case for bug that's been fixed.
...
llvm-svn: 59941
2008-11-24 05:11:21 +00:00
Anders Carlsson
a42ee44aab
The address of a variable is only constant if the variable has global storage.
...
llvm-svn: 59939
2008-11-24 04:41:22 +00:00
Anders Carlsson
4c76e93507
Fix bug in the constant evaluator. Fixes PR3115.
...
llvm-svn: 59938
2008-11-24 04:21:33 +00:00
Chris Lattner
1cbaacc4a0
Migrate some stuff from NamedDecl::getName() to
...
NamedDecl::getNameAsString() to make it more explicit.
llvm-svn: 59937
2008-11-24 04:00:27 +00:00
Chris Lattner
86d7d91366
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
...
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.
llvm-svn: 59936
2008-11-24 03:54:41 +00:00
Chris Lattner
9b1f2792ba
simplify this code.
...
llvm-svn: 59935
2008-11-24 03:52:59 +00:00
Chris Lattner
e4b95698df
Rename Selector::getName() to Selector::getAsString(), and add
...
a new NamedDecl::getAsString() method.
Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.
This also adds new formatters for objcinstance and objcclass
as described in the dox.
llvm-svn: 59933
2008-11-24 03:33:13 +00:00
Zhongxing Xu
8361d4c51b
Add a comment about the signedness.
...
llvm-svn: 59932
2008-11-24 02:30:48 +00:00
Zhongxing Xu
bf900755d0
Add test case for out-of-bound memory access checking.
...
llvm-svn: 59931
2008-11-24 02:19:49 +00:00
Zhongxing Xu
a61731dd0d
Add getSize() support for StringRegion.
...
llvm-svn: 59930
2008-11-24 02:18:56 +00:00
Chris Lattner
4fc69799f5
Rewrite FindDiagnostics to be more strict about the formatting of the
...
expected-foo strings. Now the only allowed characters between
expected-error and {{ is whitespace.
llvm-svn: 59925
2008-11-24 01:28:17 +00:00
Chris Lattner
f3ab014308
clean up -verify mode output. If the expected-error string is
...
mangled, report it using the diagnostics machinery instead of printf.
llvm-svn: 59924
2008-11-23 23:38:26 +00:00
Chris Lattner
12f7c5a36a
convert some more warnings to NOTEs.
...
llvm-svn: 59923
2008-11-23 23:26:13 +00:00
Chris Lattner
d068503565
remove warn_previous_declaration
...
llvm-svn: 59922
2008-11-23 23:20:13 +00:00
Chris Lattner
03c4041cb5
make the 'to match this' diagnostic a note.
...
llvm-svn: 59921
2008-11-23 23:17:07 +00:00
Chris Lattner
0369c57ac6
Make all the 'redefinition' diagnostics more consistent, and make the
...
"previously defined here" diagnostics all notes.
llvm-svn: 59920
2008-11-23 23:12:31 +00:00
Chris Lattner
e6447ef989
make some objc redefinition warnings more consistent: call definitions
...
"definitions", not declarations. Point out the location of the
original definition.
llvm-svn: 59919
2008-11-23 22:46:27 +00:00
Chris Lattner
88dcd2a1ab
Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
...
Also, point out where the previous decl was. This unxfails two tests.
llvm-svn: 59918
2008-11-23 22:38:38 +00:00
Chris Lattner
e3d20d9545
Convert IdentifierInfo's to be printed the same as DeclarationNames
...
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:
Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
instead of:
Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
I will fix this in a follow-up commit.
As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.
llvm-svn: 59917
2008-11-23 21:45:46 +00:00
Chris Lattner
f7e69d5a77
add support for inserting a DeclarationName into a diagnostic directly
...
without calling getAsString(). This implicitly puts quotes around the
name, so diagnostics need to be tweaked to accommodate this.
llvm-svn: 59916
2008-11-23 20:28:15 +00:00
Chris Lattner
d125393d24
inserting a qualtype adds quotes implicitly
...
llvm-svn: 59915
2008-11-23 20:27:13 +00:00
Chris Lattner
63ecc509e3
Genericize the qualtype formating callback to support any diag argument.
...
No functionality change.
llvm-svn: 59908
2008-11-23 09:21:17 +00:00
Chris Lattner
6a2ed6f6dc
Add support for sending QualType's directly into diags and convert two
...
diags over to use this. QualTypes implicitly print single quotes around
them for uniformity and future extension.
Doing this requires a little function pointer dance to prevent libbasic
from depending on libast.
llvm-svn: 59907
2008-11-23 09:13:29 +00:00
Chris Lattner
4e2e9f1a5d
other minor edits.
...
llvm-svn: 59906
2008-11-23 08:32:53 +00:00
Chris Lattner
c788a8bdec
minor cleanups.
...
llvm-svn: 59905
2008-11-23 08:16:56 +00:00
Zhongxing Xu
aa86cff14c
Add out-of-bound memory access warning report code.
...
llvm-svn: 59903
2008-11-23 05:52:28 +00:00
Zhongxing Xu
60d6cd1940
Improve test case.
...
llvm-svn: 59902
2008-11-23 05:50:21 +00:00
Zhongxing Xu
cdf25053ee
Clean up code by using utility methods.
...
llvm-svn: 59899
2008-11-23 04:30:35 +00:00
Chris Lattner
1fea89ccb1
finish up the diagnostics documentation. We don't
...
support QualType and DeclarationName yet, so some of it
is lies, however, this will be fixed shortly.
llvm-svn: 59896
2008-11-23 00:42:53 +00:00
Chris Lattner
80bec16f14
more updates
...
llvm-svn: 59895
2008-11-23 00:28:33 +00:00
Chris Lattner
cc6147cd3b
finish documentation of %select.
...
llvm-svn: 59892
2008-11-22 23:50:47 +00:00
Anders Carlsson
7c282e4f3f
Return false if we encounter a type we can't handle.
...
llvm-svn: 59889
2008-11-22 22:56:32 +00:00
Sebastian Redl
632ab20e1e
Fix test cases broken by quote normalization in diagnostics.
...
llvm-svn: 59888
2008-11-22 22:39:41 +00:00
Anders Carlsson
4046e65b27
An expression is not foldable if it can't be fully evaluated. Fixes PR3060
...
llvm-svn: 59887
2008-11-22 22:32:07 +00:00
Fariborz Jahanian
9ac535162b
Implemented ir-gen for 'implicit' properties using the new AST nodes.
...
llvm-svn: 59886
2008-11-22 22:30:21 +00:00
Sebastian Redl
6cae80da20
Documentation for the plural modifier.
...
llvm-svn: 59885
2008-11-22 22:16:45 +00:00
Anders Carlsson
475f4bce36
Case values must be evaluated
...
llvm-svn: 59884
2008-11-22 21:50:49 +00:00
Chris Lattner
e72a8a3048
start documenting Diagnostics. Sebastian, I'd appreciate it
...
if you can fill in the section for %plural.
llvm-svn: 59883
2008-11-22 21:41:31 +00:00
Chris Lattner
ddda82b200
consistently use single quotes for quoted things.
...
llvm-svn: 59882
2008-11-22 21:16:43 +00:00
Anders Carlsson
59689ed764
Use Expr::Evaluate for case statements. Fixes PR2525
...
llvm-svn: 59881
2008-11-22 21:04:56 +00:00
Anders Carlsson
2fedf0e8f7
Fix indentation width.
...
llvm-svn: 59880
2008-11-22 20:49:42 +00:00
Chris Lattner
bd414e34c2
remove a dead enum
...
llvm-svn: 59879
2008-11-22 20:47:38 +00:00
Fariborz Jahanian
5118c418e6
Support for implicit property assignment. Error assigning to
...
'implicit' property with no 'setter'.
llvm-svn: 59878
2008-11-22 20:25:50 +00:00
Chris Lattner
8cd9b96ee1
add a silly testcase
...
llvm-svn: 59877
2008-11-22 19:57:03 +00:00
Fariborz Jahanian
bf65ce5372
And a test case for my last patch.
...
llvm-svn: 59875
2008-11-22 18:40:47 +00:00
Fariborz Jahanian
8a1810f06b
New AST node to access "implicit" setter/getter using property dor syntax.
...
Issuing diagnostics when assigning to read-only properties.
This is work in progress.
llvm-svn: 59874
2008-11-22 18:39:36 +00:00
Sebastian Redl
15b02d2e62
Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics.
...
llvm-svn: 59871
2008-11-22 13:44:36 +00:00
Zhongxing Xu
4c8bf0086a
Remove debug code.
...
llvm-svn: 59870
2008-11-22 13:23:00 +00:00
Zhongxing Xu
4d45b34a8a
Initial support for checking out of bound memory access. Only support
...
ConcreteInt index for now.
llvm-svn: 59869
2008-11-22 13:21:46 +00:00
Chris Lattner
3b0f3ef97e
remove some more old Diag methods, replace with a single static helper function
...
llvm-svn: 59868
2008-11-22 08:32:36 +00:00
Chris Lattner
bc495d775f
move the Diag method for Sema to be inline. This shrinks the release-asserts
...
clang executable (when built with gcc 4.2 on the mac) from 14519740 to
14495028 bytes. This shrinks individual object files as well: SemaChecking
from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from
115628->110516, as well as several others.
llvm-svn: 59867
2008-11-22 08:28:49 +00:00
Chris Lattner
060068a0ef
alphabeticalize.
...
llvm-svn: 59866
2008-11-22 08:22:53 +00:00
Chris Lattner
f3cb394f41
Fix a weird inconsistency with hex floats. Previously the lexer
...
would not eat the "-1" in "0x0p-1", but LiteralSupport would accept
it when extensions are on. This caused strangeness and failures
when hexfloats were properly treated as an extension (not error)
in LiteralSupport.
llvm-svn: 59865
2008-11-22 07:39:03 +00:00
Chris Lattner
59acca5874
remove the NumericLiteralParser::Diag helper method, inlining it into
...
its call sites. This makes it more explicit when the hasError flag is
getting set and removes a confusing difference in behavior between
PP.Diag and Diag in this code.
llvm-svn: 59863
2008-11-22 07:23:31 +00:00
Chris Lattner
1ef2028205
Move the Preprocessor::Diag methods inline. This has the interesting
...
(and carefully calculated) effect of allowing the compiler to reason
about the aliasing properties of DiagnosticBuilder object better,
allowing the whole thing to be promoted to registers instead of
resulting in a ton of stack traffic.
While I'm not very concerned about the performance of the Diag() method
invocations, I *am* more concerned about their code size and impact on the
non-diagnostic code. This patch shrinks the clang executable (in
release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This
isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o
from 31116 to 28868 bytes, etc.
llvm-svn: 59862
2008-11-22 07:03:46 +00:00
Anders Carlsson
4d5f2e532c
Add test for PR2992.
...
llvm-svn: 59861
2008-11-22 06:42:54 +00:00
Chris Lattner
fdabe83c67
inline a method into its only two call sites.
...
llvm-svn: 59860
2008-11-22 06:42:31 +00:00
Chris Lattner
014156e108
actually, this version isn't really needed.
...
llvm-svn: 59859
2008-11-22 06:22:39 +00:00
Chris Lattner
57dab26be1
remove a sneaky version of Diag hiding in PreprocessorLexer.
...
llvm-svn: 59858
2008-11-22 06:20:42 +00:00
Anders Carlsson
20e11f8fc8
Use tryEvaluate for constant exprs.
...
llvm-svn: 59857
2008-11-22 02:34:39 +00:00
Chris Lattner
6d27a16b95
Change the Lexer::Diag method to not magically silence warnings,
...
force the caller to check instead. This eliminates the need (and the
risk!) of weird null DiagnosticBuilder's floating around.
llvm-svn: 59856
2008-11-22 02:02:22 +00:00
Chris Lattner
399f9656ba
Teach tentative parsing to handle block pointers (rdar://6394309)
...
llvm-svn: 59853
2008-11-22 01:15:33 +00:00
Chris Lattner
afd8aa9d73
fit in 80 cols
...
llvm-svn: 59851
2008-11-22 01:04:49 +00:00
Ted Kremenek
25391e7cb7
reverting this because it breaks some blocks cases, I'll send doug a testcase
...
llvm-svn: 59850
2008-11-22 01:04:48 +00:00
Chris Lattner
427c9c1763
Split the DiagnosticInfo class into two disjoint classes:
...
one for building up the diagnostic that is in flight (DiagnosticBuilder)
and one for pulling structured information out of the diagnostic when
formatting and presenting it.
There is no functionality change with this patch.
llvm-svn: 59849
2008-11-22 00:59:29 +00:00
Ted Kremenek
a3148f16e4
Fix predicate: we're not in caching mode if CurPPLexer == 0, not CurLexer == 0.
...
llvm-svn: 59848
2008-11-22 00:41:34 +00:00
Ted Kremenek
6b3ced2b15
In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles transitions in the preprocessor state.
...
llvm-svn: 59845
2008-11-21 23:28:56 +00:00
Ted Kremenek
1ad05ce600
Reenable the default lexer.
...
llvm-svn: 59843
2008-11-21 20:51:59 +00:00
Ted Kremenek
b6209858cb
When creating the raw tokens for PTHLexer, make sure the token representing the file to include is checked for being an identifier.
...
llvm-svn: 59842
2008-11-21 20:51:15 +00:00
Ted Kremenek
72d9912b08
When creating raw tokens for the PTHLexer specially handle angled strings for #include directives.
...
llvm-svn: 59840
2008-11-21 19:41:29 +00:00
Fariborz Jahanian
e2caaaa13c
Fixed bugzilla bug# 3095 related to code gen. for @synchronized.
...
llvm-svn: 59838
2008-11-21 19:21:53 +00:00
Sebastian Redl
bd150f431e
Implementation of new and delete parsing and sema.
...
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.
llvm-svn: 59835
2008-11-21 19:14:01 +00:00
Chris Lattner
841399c95a
rearrange some fields.
...
llvm-svn: 59832
2008-11-21 18:59:21 +00:00
Chris Lattner
cedef8d111
merge some simple call diagnostics.
...
llvm-svn: 59831
2008-11-21 18:44:24 +00:00
Chris Lattner
40bb0c83d4
print a type in a diagnostic.
...
llvm-svn: 59829
2008-11-21 18:27:34 +00:00
Fariborz Jahanian
735a4158d9
Fields of ivars of struct types are considered ivars
...
themselves for gc API generation purposes.
llvm-svn: 59828
2008-11-21 18:14:01 +00:00
Douglas Gregor
09075a99e0
Don't turn off blocks in C++
...
llvm-svn: 59827
2008-11-21 17:10:06 +00:00
Chris Lattner
0f137df0aa
reapply the (corrected) patch to use the new llvm intrinsics for memcpy/memmove etc.
...
llvm-svn: 59824
2008-11-21 16:43:15 +00:00
Douglas Gregor
5d58c3a568
Allow redeclaration of typedefs in C++
...
llvm-svn: 59822
2008-11-21 16:29:06 +00:00
Chris Lattner
b7f4ce3de7
temporarily revert Sangiv's patch.
...
llvm-svn: 59821
2008-11-21 16:26:37 +00:00
Douglas Gregor
15799fd210
Tiny fix to the parsing of linkage-specifications
...
llvm-svn: 59820
2008-11-21 16:10:08 +00:00
Douglas Gregor
b81897cda6
Fix overloading of non-static member functions that differ in their cv-qualifiers
...
llvm-svn: 59819
2008-11-21 15:36:28 +00:00
Douglas Gregor
9eb16eadfb
Enable some more operator overloading tests, and don't look into an identifier for functions that might not have one
...
llvm-svn: 59818
2008-11-21 15:30:19 +00:00
Sanjiv Gupta
371298488b
mem[cpy,set,move] intrinsics are now overloaded.
...
llvm-svn: 59806
2008-11-21 07:57:42 +00:00
Chris Lattner
c5bab9f35e
merge 3 more diagnostics into 1.
...
llvm-svn: 59805
2008-11-21 07:57:12 +00:00
Chris Lattner
2b78690a9c
Add the concept of "modifiers" to the clang diagnostic format
...
strings. This allows us to have considerable flexibility in how
these things are displayed and provides extra information that
allows us to merge away diagnostics that are very similar.
Diagnostic modifiers are a string of characters with the regex
[-a-z]+ that occur between the % and digit. They may
optionally have an argument that can parameterize them.
For now, I've added two example modifiers. One is a very useful
tool that allows you to factor commonality across diagnostics
that need single words or phrases combined. Basically you can
use %select{a|b|c}4 with with an integer argument that selects
either a/b/c based on an integer value in the range [0..3).
The second modifier is also an integer modifier, aimed to help
English diagnostics handle plurality. "%s3" prints to 's' if
integer argument #3 is not 1, otherwise it prints to nothing.
I'm fully aware that 's' is an English concept and doesn't
apply to all situations (mouse vs mice). However, this is very
useful and we can add other crazy modifiers once we add support
for polish! ;-)
I converted a couple C++ diagnostics over to use this as an
example, I'd appreciate it if others could merge the other
likely candiates. If you have other modifiers that you want,
lets talk on cfe-dev.
llvm-svn: 59803
2008-11-21 07:50:02 +00:00
Chris Lattner
6b0cf14ba4
Change CheckIncrementDecrementOperand to test for common cases first
...
and fall through better.
llvm-svn: 59799
2008-11-21 07:05:48 +00:00
Chris Lattner
85a94a04f4
move the diagnostic location and ID out of DiagnosticInfo and store it in
...
the Diagnostic class. Since we can already only have one diagnostic in
flight at a time, this shrinks DiagnosticInfo.
This reduces DiagnosticInfo to being basically a rather crazy smart pointer
to a DiagnosticInfo :)
llvm-svn: 59798
2008-11-21 06:59:12 +00:00
Chris Lattner
b11c23da14
move diagnostic insertion methods to be free methods instead of
...
in the DiagnosticInfo class. This requires marking them as taking
a const DiagnosticInfo, which is bogus (they logically mutate DI),
but works with the C++ type system.
llvm-svn: 59797
2008-11-21 06:54:20 +00:00
Chris Lattner
adcbb7f85d
testcase for PR3096
...
llvm-svn: 59794
2008-11-21 06:19:48 +00:00
Douglas Gregor
9ecea26443
Cleanup memory management in overloading of operator->, slightly
...
llvm-svn: 59791
2008-11-21 03:04:22 +00:00
Douglas Gregor
4fc308bd3b
Don't print canonical types in overloading-related diagnostics
...
llvm-svn: 59789
2008-11-21 02:54:28 +00:00
Chris Lattner
fd384b1b3a
Change -verify mode to find the "expected-error" and "expected-warning" strings
...
with a raw lexer instead of a PP lexer. This means that -verify doesn't scan
#include'd headers for expected-error/warning strings, and it also means that it
doesn't ignore them in #if 0.
llvm-svn: 59774
2008-11-21 01:18:36 +00:00
Ted Kremenek
473d76e81d
Add comment to IsFileLexer, clean up indentation, and tighten how it's written.
...
llvm-svn: 59773
2008-11-21 01:07:52 +00:00
Chris Lattner
66c8bebe81
remove expected-error from #if 0 section of code.
...
llvm-svn: 59772
2008-11-21 01:05:35 +00:00
Chris Lattner
4d7c58f0eb
disable expected-errors in #if parts of the test.
...
llvm-svn: 59771
2008-11-21 01:05:04 +00:00
Chris Lattner
1759ea400e
split into two tests.
...
llvm-svn: 59770
2008-11-21 01:04:13 +00:00
Ted Kremenek
53ab374d9f
PTHLexer:
...
- Move out logic for handling the end-of-file to LexEndOfFile (to match the Lexer) class. The logic now mirrors the Lexer class more, which allows us to pass most of the Preprocessor test cases.
llvm-svn: 59768
2008-11-21 00:58:35 +00:00
Fariborz Jahanian
c2ad6dc3b4
Consolidated @try and @synchronize into a single
...
code gen. method.
llvm-svn: 59767
2008-11-21 00:49:24 +00:00
Ted Kremenek
dfcbcfe328
Add checker test case: warn about returning an uninitialized value to the caller.
...
llvm-svn: 59765
2008-11-21 00:28:47 +00:00
Ted Kremenek
0b63f96ab5
- Clean up transfer function logic for 'return' statements.
...
- Add check for returning an undefined value to a caller.
llvm-svn: 59764
2008-11-21 00:27:44 +00:00
Ted Kremenek
c7792048ff
Enable test file for 'region store' in addition to basic store.
...
llvm-svn: 59762
2008-11-21 00:15:15 +00:00
Fariborz Jahanian
75686a58f3
Support generation of objc_assign_ivar for ivar
...
write-barriers.
llvm-svn: 59748
2008-11-20 20:53:20 +00:00