]> granicus.if.org Git - clang/log
clang
15 years agoimplement semantic analysis for @synchronized, fixing a crash on invalid
Chris Lattner [Tue, 21 Apr 2009 06:11:25 +0000 (06:11 +0000)]
implement semantic analysis for @synchronized, fixing a crash on invalid
rdar://6810940 - @synchronized has no sema checks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69670 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothis time with more workingness.
Chris Lattner [Tue, 21 Apr 2009 06:06:09 +0000 (06:06 +0000)]
this time with more workingness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69669 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass and return aggregate types directly to function calls.
Sanjiv Gupta [Tue, 21 Apr 2009 06:01:16 +0000 (06:01 +0000)]
Pass and return aggregate types directly to function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69668 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for goto checking and @synchronized blocks,
Chris Lattner [Tue, 21 Apr 2009 06:01:00 +0000 (06:01 +0000)]
add support for goto checking and @synchronized blocks,
rdar://6810106

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix massive testsuite failures from Alexei's patch due to inverted logic.
Chris Lattner [Tue, 21 Apr 2009 06:00:24 +0000 (06:00 +0000)]
fix massive testsuite failures from Alexei's patch due to inverted logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69666 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSplit preprocessor initialization logic out of clang-cc into
Chris Lattner [Tue, 21 Apr 2009 05:40:52 +0000 (05:40 +0000)]
Split preprocessor initialization logic out of clang-cc into
libfrontend.  Patch by Alexei Svitkine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69664 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodocument new form of -fdiagnostics-print-source-range-in
Chris Lattner [Tue, 21 Apr 2009 05:35:32 +0000 (05:35 +0000)]
document new form of -fdiagnostics-print-source-range-in

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69663 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Chris Lattner [Tue, 21 Apr 2009 05:34:31 +0000 (05:34 +0000)]
rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69662 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4027 + rdar://6808859, we were rejecting implicit casts of
Chris Lattner [Tue, 21 Apr 2009 05:19:11 +0000 (05:19 +0000)]
Fix PR4027 + rdar://6808859, we were rejecting implicit casts of
aggregates even though we already accept explicit ones.  Easy fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodowngrade from extwarn to warning.
Chris Lattner [Tue, 21 Apr 2009 04:54:03 +0000 (04:54 +0000)]
downgrade from extwarn to warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69660 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove MacroInfo to track the source range of the macro definition,
Chris Lattner [Tue, 21 Apr 2009 04:46:33 +0000 (04:46 +0000)]
improve MacroInfo to track the source range of the macro definition,
patch by Alexei Svitkine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69659 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse of predefined identifiers like __func__ at global scope warn in sema,
Chris Lattner [Tue, 21 Apr 2009 04:41:23 +0000 (04:41 +0000)]
use of predefined identifiers like __func__ at global scope warn in sema,
but crashed codegen.  Fix this to report the name of the llvm function.
This fixes rdar://6808051

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake "in included from" and "in instatiation from" messages respect
Chris Lattner [Tue, 21 Apr 2009 03:57:54 +0000 (03:57 +0000)]
make "in included from" and "in instatiation from" messages respect
-fno-show-location, patch by Alexei Svitkine (PR4024)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a preprocessor callback function for #undef, patch by
Chris Lattner [Tue, 21 Apr 2009 03:42:09 +0000 (03:42 +0000)]
add a preprocessor callback function for #undef, patch by
Alexei Svitkine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69656 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.
Anders Carlsson [Tue, 21 Apr 2009 02:22:11 +0000 (02:22 +0000)]
Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69654 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse an APInt of target int size to detect overflow while parsing multichars.
Sanjiv Gupta [Tue, 21 Apr 2009 02:21:29 +0000 (02:21 +0000)]
Use an APInt of target int size to detect overflow while parsing multichars.
So 'abc' on i16 platforms will warn but not on i32 platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69653 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the beginnings of a CXXTempVarDecl class.
Anders Carlsson [Tue, 21 Apr 2009 01:57:48 +0000 (01:57 +0000)]
Add the beginnings of a CXXTempVarDecl class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69652 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unnused variable.
Daniel Dunbar [Tue, 21 Apr 2009 01:32:46 +0000 (01:32 +0000)]
Remove unnused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69650 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoKill ASTContext::[gs]etFieldForDecl, instead we just lookup things
Daniel Dunbar [Tue, 21 Apr 2009 01:19:28 +0000 (01:19 +0000)]
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 69646, that was the precise inverse of what I wanted to commit.
Daniel Dunbar [Tue, 21 Apr 2009 01:19:10 +0000 (01:19 +0000)]
Revert 69646, that was the precise inverse of what I wanted to commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69647 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoKill ASTContext::[gs]etFieldForDecl, instead we just lookup things
Daniel Dunbar [Tue, 21 Apr 2009 01:18:01 +0000 (01:18 +0000)]
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69646 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixup codegen for write barriers for block variables. Radar 6786715
Mike Stump [Tue, 21 Apr 2009 00:51:43 +0000 (00:51 +0000)]
Fixup codegen for write barriers for block variables.  Radar 6786715

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69642 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove LateBoundIVars() runtime interface, it is unused.
Daniel Dunbar [Tue, 21 Apr 2009 00:49:20 +0000 (00:49 +0000)]
Remove LateBoundIVars() runtime interface, it is unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69641 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAssert on a few conditions that (I believe) should hold
Daniel Dunbar [Tue, 21 Apr 2009 00:41:40 +0000 (00:41 +0000)]
Assert on a few conditions that (I believe) should hold
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69639 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLook at the TMP environment variable as well.
Daniel Dunbar [Tue, 21 Apr 2009 00:25:10 +0000 (00:25 +0000)]
Look at the TMP environment variable as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69638 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate this (non-default) test case.
Daniel Dunbar [Mon, 20 Apr 2009 23:53:56 +0000 (23:53 +0000)]
Update this (non-default) test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69636 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoObjC2's Ivar bitmap layout work. No change in functionality.
Fariborz Jahanian [Mon, 20 Apr 2009 22:03:45 +0000 (22:03 +0000)]
ObjC2's Ivar bitmap layout work. No change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69629 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMark TypeForDecl mutable.
Daniel Dunbar [Mon, 20 Apr 2009 21:52:34 +0000 (21:52 +0000)]
Mark TypeForDecl mutable.
 - Let the const propogation begin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69628 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix the second half of PR4006 and rdar://6807000 by treating
Chris Lattner [Mon, 20 Apr 2009 21:08:10 +0000 (21:08 +0000)]
fix the second half of PR4006 and rdar://6807000 by treating
() as being either zero arguments or one empty argument depending
on situation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69627 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWrite the identifier table into the PCH file as an on-disk hash table
Douglas Gregor [Mon, 20 Apr 2009 20:36:09 +0000 (20:36 +0000)]
Write the identifier table into the PCH file as an on-disk hash table
that also includes the contents of the IdentifierInfo itself (the
various fields and flags, along with the chain of identifiers visible
at the top level that have that name).

We don't make any use of the hash table yet, except that our
identifier ID -> string mapping points into the hash table now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69625 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix tyop in SSSE3 header (6808876).
Anders Carlsson [Mon, 20 Apr 2009 20:31:10 +0000 (20:31 +0000)]
Fix tyop in SSSE3 header (6808876).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69623 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlso look at the TEMP environment variable as a place to put temporary
Daniel Dunbar [Mon, 20 Apr 2009 20:28:21 +0000 (20:28 +0000)]
Also look at the TEMP environment variable as a place to put temporary
files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69622 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove countInheritedIvars to within striking distance of
Daniel Dunbar [Mon, 20 Apr 2009 20:18:54 +0000 (20:18 +0000)]
Move countInheritedIvars to within striking distance of
GetClassSizeInfo

Reduce nesting in GetInterfaceDeclStructLayout.

Tweak some comments.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69621 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix spelling error.
Steve Naroff [Mon, 20 Apr 2009 20:16:02 +0000 (20:16 +0000)]
Fix spelling error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69620 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.
Steve Naroff [Mon, 20 Apr 2009 20:09:33 +0000 (20:09 +0000)]
Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.

Next step: Add selector support to PCHWriter::AddDeclarationName().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothe __gnuc_inline__ attribute is actually named __gnu_inline__,
Chris Lattner [Mon, 20 Apr 2009 19:12:28 +0000 (19:12 +0000)]
the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case to check line number in debug info.
Devang Patel [Mon, 20 Apr 2009 19:07:55 +0000 (19:07 +0000)]
Add test case to check line number in debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69617 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow the Info type used in the on-disk hash table generator to have state
Douglas Gregor [Mon, 20 Apr 2009 19:03:54 +0000 (19:03 +0000)]
Allow the Info type used in the on-disk hash table generator to have state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69616 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf defined, use TMPDIR environment variable as location for temporary files.
Daniel Dunbar [Mon, 20 Apr 2009 17:32:49 +0000 (17:32 +0000)]
If defined, use TMPDIR environment variable as location for temporary files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69609 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclean up anonymous bitfield diagnostics, PR4017
Chris Lattner [Mon, 20 Apr 2009 17:29:38 +0000 (17:29 +0000)]
clean up anonymous bitfield diagnostics, PR4017

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69608 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce the notion of a SemaConsumer, which is an ASTConsumer that
Douglas Gregor [Mon, 20 Apr 2009 15:53:59 +0000 (15:53 +0000)]
Introduce the notion of a SemaConsumer, which is an ASTConsumer that
also gets access to the Sema object performing semantic analysis. This
will be used by the PCH writer to serialize Sema state.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69595 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd pch reader/writer support for ObjCMethodDecl.
Steve Naroff [Mon, 20 Apr 2009 15:06:07 +0000 (15:06 +0000)]
Add pch reader/writer support for ObjCMethodDecl.

Test will be enabled with ObjCInterfaceDecl is added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate the doc.
Zhongxing Xu [Mon, 20 Apr 2009 10:09:10 +0000 (10:09 +0000)]
update the doc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69587 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome cleanup and bug-fixing for address-of checking. This causes a couple of
Eli Friedman [Mon, 20 Apr 2009 08:23:18 +0000 (08:23 +0000)]
Some cleanup and bug-fixing for address-of checking.  This causes a couple of
minor accepts-invalid regressions, but we weren't really rejecting them for
the right reason.  We really need a more general solution to detect all the
cases of the promotion of arrays with a register storage class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69586 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the on-disk hash table usable with non-file
Douglas Gregor [Mon, 20 Apr 2009 07:36:26 +0000 (07:36 +0000)]
Make the on-disk hash table usable with non-file
raw_ostreams. Requires LLVM r69583.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69584 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInline GetFirstIvarInRecord into sole caller.
Daniel Dunbar [Mon, 20 Apr 2009 07:18:49 +0000 (07:18 +0000)]
Inline GetFirstIvarInRecord into sole caller.
 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69582 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet a bit in IMAGE_INFO to indicate that we don't contain any
Daniel Dunbar [Mon, 20 Apr 2009 07:11:47 +0000 (07:11 +0000)]
Set a bit in IMAGE_INFO to indicate that we don't contain any
@synthesized ivars for superclasses.
 - <rdar://problem/6806371> [clang] Mark code without miscompiled
   @synthesized properties

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69581 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the on-disk hash table code into its own header. No functionality change.
Douglas Gregor [Mon, 20 Apr 2009 07:08:21 +0000 (07:08 +0000)]
Move the on-disk hash table code into its own header. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69580 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLift out GetNamedIvarList.
Daniel Dunbar [Mon, 20 Apr 2009 06:54:31 +0000 (06:54 +0000)]
Lift out GetNamedIvarList.

Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
 - This is somewhat less efficient, but I need to detangle this code
   first...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69579 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake FieldDecl parameter to getObjCEncodingForType... const.
Daniel Dunbar [Mon, 20 Apr 2009 06:37:24 +0000 (06:37 +0000)]
Make FieldDecl parameter to getObjCEncodingForType... const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69578 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove loc::FuncVal.
Zhongxing Xu [Mon, 20 Apr 2009 06:35:22 +0000 (06:35 +0000)]
Remove loc::FuncVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69577 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomore stuff.
Chris Lattner [Mon, 20 Apr 2009 06:26:18 +0000 (06:26 +0000)]
more stuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69576 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't crash in the diagnostic printer if we happen to get passed a
Daniel Dunbar [Mon, 20 Apr 2009 06:13:16 +0000 (06:13 +0000)]
Don't crash in the diagnostic printer if we happen to get passed a
null string / identifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69575 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a bunch of diagnostics options, add one example warning group.
Chris Lattner [Mon, 20 Apr 2009 06:00:23 +0000 (06:00 +0000)]
add a bunch of diagnostics options, add one example warning group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69573 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't emit ivar offsets for unnamed bit fields.
Daniel Dunbar [Mon, 20 Apr 2009 05:53:40 +0000 (05:53 +0000)]
Don't emit ivar offsets for unnamed bit fields.

Also, added assertion that the field matches what would be looked up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69572 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd option groups for -Wimplicit-int and -Wimplicit.
Chris Lattner [Mon, 20 Apr 2009 05:45:34 +0000 (05:45 +0000)]
Add option groups for -Wimplicit-int and -Wimplicit.
remove special case hack for -Werror-implicit-function-declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69571 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoget a CodeTextRegion when visiting FunctionDecl reference.
Zhongxing Xu [Mon, 20 Apr 2009 05:24:46 +0000 (05:24 +0000)]
get a CodeTextRegion when visiting FunctionDecl reference.
get FunctionDecl with more general utility method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69570 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoslurp some content from the PTH doc into the user's doc.
Chris Lattner [Mon, 20 Apr 2009 04:37:38 +0000 (04:37 +0000)]
slurp some content from the PTH doc into the user's doc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69569 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoinitial skeleton of a user's manual.
Chris Lattner [Mon, 20 Apr 2009 04:23:09 +0000 (04:23 +0000)]
initial skeleton of a user's manual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69568 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
Eli Friedman [Mon, 20 Apr 2009 03:54:15 +0000 (03:54 +0000)]
PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
subsequently crashed).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.
Eli Friedman [Mon, 20 Apr 2009 03:21:44 +0000 (03:21 +0000)]
PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.

Adapted from patch by Tim Northover.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAs we now have ValueManager as the new value factory, we do not need factory
Zhongxing Xu [Mon, 20 Apr 2009 02:27:09 +0000 (02:27 +0000)]
As we now have ValueManager as the new value factory, we do not need factory
methods of SVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69565 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHook up -Wunused-value to the unused expression warning. This is
Eli Friedman [Mon, 20 Apr 2009 01:56:54 +0000 (01:56 +0000)]
Hook up -Wunused-value to the unused expression warning.  This is
useful for macro-heavy codebases that tend to trigger this warning a
lot.

Note that a make clean is required to get the option working; the
dependencies for DiagnosticGroups.inc appear to be broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69564 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove non-const form of lookupFieldDeclForIvar.
Daniel Dunbar [Mon, 20 Apr 2009 00:37:55 +0000 (00:37 +0000)]
Remove non-const form of lookupFieldDeclForIvar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoComment fixes.
Daniel Dunbar [Mon, 20 Apr 2009 00:33:43 +0000 (00:33 +0000)]
Comment fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLift GetClassSizeInfo out of GenerateClass, add a FIXME.
Daniel Dunbar [Sun, 19 Apr 2009 23:41:48 +0000 (23:41 +0000)]
Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69561 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement "#pragma GCC diagnostic". Besides being a nice feature, this
Chris Lattner [Sun, 19 Apr 2009 23:16:58 +0000 (23:16 +0000)]
implement "#pragma GCC diagnostic".  Besides being a nice feature, this
will let us test for multiple different warning modes in the same
file in regression tests.

This implements rdar://2362963, a 10-year old feature request :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69560 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove group twiddling options into Diagnostic.cpp instead of
Chris Lattner [Sun, 19 Apr 2009 22:34:23 +0000 (22:34 +0000)]
move group twiddling options into Diagnostic.cpp instead of
Warnings.cpp.  Warnings.cpp now doesn't need to #include
tblgen produced output directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69559 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodon't crash on invalid ranges in -fprint-source-range-info
Chris Lattner [Sun, 19 Apr 2009 22:24:10 +0000 (22:24 +0000)]
don't crash on invalid ranges in -fprint-source-range-info
mode, just ignore them as usual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69558 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4007: clang doesn't know -Werror-foo is the same as -Werror=foo
Chris Lattner [Sun, 19 Apr 2009 22:07:21 +0000 (22:07 +0000)]
Fix PR4007: clang doesn't know  -Werror-foo is the same as -Werror=foo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69557 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWarn about uses of #pragma STDC FENV_ACCESS ON, since we don't
Chris Lattner [Sun, 19 Apr 2009 21:55:32 +0000 (21:55 +0000)]
Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
support it.  I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.

This concludes my planned hacking on STDC pragmas, flame away :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConditional operator C++ checking complete. What issues remain are in more general...
Sebastian Redl [Sun, 19 Apr 2009 21:53:20 +0000 (21:53 +0000)]
Conditional operator C++ checking complete. What issues remain are in more general code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69555 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodiagnose invalid syntax of STDC pragmas.
Chris Lattner [Sun, 19 Apr 2009 21:50:08 +0000 (21:50 +0000)]
diagnose invalid syntax of STDC pragmas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint an error for uses of __thread on targets which don't support it.
Eli Friedman [Sun, 19 Apr 2009 21:48:33 +0000 (21:48 +0000)]
Print an error for uses of __thread on targets which don't support it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd target property for whether thread-local storage is supported.
Eli Friedman [Sun, 19 Apr 2009 21:38:35 +0000 (21:38 +0000)]
Add target property for whether thread-local storage is supported.
Let me know if I messed up for some target.  Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreject invalid stuff in the STDC namespace.
Chris Lattner [Sun, 19 Apr 2009 21:25:37 +0000 (21:25 +0000)]
reject invalid stuff in the STDC namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostub out STDC #pragmas.
Chris Lattner [Sun, 19 Apr 2009 21:20:35 +0000 (21:20 +0000)]
stub out STDC #pragmas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69550 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForward f[no-]dollars-in-identifiers to clang, when specified.
Daniel Dunbar [Sun, 19 Apr 2009 21:20:32 +0000 (21:20 +0000)]
Forward f[no-]dollars-in-identifiers to clang, when specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBring member pointer operands of the conditional operator to a common type. We're...
Sebastian Redl [Sun, 19 Apr 2009 21:15:26 +0000 (21:15 +0000)]
Bring member pointer operands of the conditional operator to a common type. We're getting there ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69548 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agobasic support for -Wunknown-pragmas, more coming.
Chris Lattner [Sun, 19 Apr 2009 21:10:26 +0000 (21:10 +0000)]
basic support for -Wunknown-pragmas, more coming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForward -fno-diagnostics-fixit-info to clang-cc.
Daniel Dunbar [Sun, 19 Apr 2009 21:09:34 +0000 (21:09 +0000)]
Forward -fno-diagnostics-fixit-info to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR3853: Add CodeGen support for __thread.
Eli Friedman [Sun, 19 Apr 2009 21:05:03 +0000 (21:05 +0000)]
PR3853: Add CodeGen support for __thread.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69545 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove token paste poisoning diagnostics to after the instantiation loc
Chris Lattner [Sun, 19 Apr 2009 20:29:42 +0000 (20:29 +0000)]
move token paste poisoning diagnostics to after the instantiation loc
for a token is set, this makes the diagnostic "expanded from stack" work
for this diagnostic.  Add a testcase for PR3918.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69544 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTests for __thread specifier.
Eli Friedman [Sun, 19 Apr 2009 20:29:08 +0000 (20:29 +0000)]
Tests for __thread specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69543 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more thorough/correct checking for invalid __thread specifiers.
Eli Friedman [Sun, 19 Apr 2009 20:27:55 +0000 (20:27 +0000)]
Add more thorough/correct checking for invalid __thread specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSilence gcc warning.
Eli Friedman [Sun, 19 Apr 2009 20:21:56 +0000 (20:21 +0000)]
Silence gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69541 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopick a smaller header, one that we control to test this.
Chris Lattner [Sun, 19 Apr 2009 20:18:57 +0000 (20:18 +0000)]
pick a smaller header, one that we control to test this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69540 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename test for consistency with other pragma test.
Chris Lattner [Sun, 19 Apr 2009 20:16:27 +0000 (20:16 +0000)]
rename test for consistency with other pragma test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69539 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge pragma poison tests into one file with -verify mode.
Chris Lattner [Sun, 19 Apr 2009 20:15:59 +0000 (20:15 +0000)]
merge pragma poison tests into one file with -verify mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69538 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge two tests
Chris Lattner [Sun, 19 Apr 2009 20:10:12 +0000 (20:10 +0000)]
merge two tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69537 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3918: Invalid use of __VA_ARGS__ not diagnosed,
Chris Lattner [Sun, 19 Apr 2009 20:06:32 +0000 (20:06 +0000)]
Fix PR3918: Invalid use of __VA_ARGS__ not diagnosed,
by rejecting invalid poisoned tokens in the token
pasting path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69536 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAnother piece of the conditional operator puzzle. We'll want to use FindCompositePoin...
Sebastian Redl [Sun, 19 Apr 2009 19:26:31 +0000 (19:26 +0000)]
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69534 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert to -verify mode.
Chris Lattner [Sun, 19 Apr 2009 18:54:13 +0000 (18:54 +0000)]
convert to -verify mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69532 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4006, incorrect handling of __VA_ARGS__ when it was the first token
Chris Lattner [Sun, 19 Apr 2009 18:26:34 +0000 (18:26 +0000)]
Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first token
in a function-like macro body.  This has the added bonus of moving some
function-like macro specific code out of the object-like macro codepath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoactually just do this on all x86 targets, it won't hurt
Chris Lattner [Sun, 19 Apr 2009 17:32:33 +0000 (17:32 +0000)]
actually just do this on all x86 targets, it won't hurt
non-glibc ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69528 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDefine __NO_MATH_INLINES on linux/x86 so that we don't get inline
Chris Lattner [Sun, 19 Apr 2009 17:29:50 +0000 (17:29 +0000)]
Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
functions in glibc header files that use FP Stack inline asm which the
backend can't deal with (PR879).

This "fixes" PR3970 for linux.  Other affected systems should do similar
things.  Maybe this should just go to the general i386/x86-64 sections?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69527 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement compiler support for -fno-diagnostics-fixit-info,
Chris Lattner [Sun, 19 Apr 2009 07:44:08 +0000 (07:44 +0000)]
implement compiler support for -fno-diagnostics-fixit-info,
rdar://6805442

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69525 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoinvalid directives can occur in #if 0 code, just pass them
Chris Lattner [Sun, 19 Apr 2009 07:32:03 +0000 (07:32 +0000)]
invalid directives can occur in #if 0 code, just pass them
through like other directives PTH doesn't care about.  This
should fix rdar://6804029

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69524 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake PTH not crash on a null directive (# on its own line)
Chris Lattner [Sun, 19 Apr 2009 07:25:40 +0000 (07:25 +0000)]
make PTH not crash on a null directive (# on its own line)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69523 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse isNot instead of !is
Chris Lattner [Sun, 19 Apr 2009 07:15:51 +0000 (07:15 +0000)]
use isNot instead of !is

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69522 91177308-0d34-0410-b5e6-96231b3b80d8