]> granicus.if.org Git - clang/log
clang
15 years agosplit diagnostic group definitions out into their own file.
Chris Lattner [Thu, 16 Apr 2009 06:17:18 +0000 (06:17 +0000)]
split diagnostic group definitions out into their own file.

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

15 years agooptimize and comment GetDiagInfo.
Chris Lattner [Thu, 16 Apr 2009 06:13:46 +0000 (06:13 +0000)]
optimize and comment GetDiagInfo.

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

15 years agomerge several scattered tables into StaticDiagInfo.
Chris Lattner [Thu, 16 Apr 2009 06:07:15 +0000 (06:07 +0000)]
merge several scattered tables into StaticDiagInfo.

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

15 years agoImplement Diagnostic::getWarningOptionForDiag with information from tblgen,
Chris Lattner [Thu, 16 Apr 2009 06:00:24 +0000 (06:00 +0000)]
Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
this implements -fdiagnostics-show-option in clang-cc.

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

15 years agotblgen is now passing diagnostic group information in the .inc file, ignore it everyw...
Chris Lattner [Thu, 16 Apr 2009 05:52:14 +0000 (05:52 +0000)]
tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.

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

15 years agoimplement framework for -fdiagnostics-show-option, but tblgen isn't
Chris Lattner [Thu, 16 Apr 2009 05:44:38 +0000 (05:44 +0000)]
implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.

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

15 years agoDisable the code I added before until I understand what's causing default2.cpp to...
Anders Carlsson [Thu, 16 Apr 2009 05:35:41 +0000 (05:35 +0000)]
Disable the code I added before until I understand what's causing default2.cpp to fail.

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

15 years agomove handling of -pedantic and -pedantic-errors into Diagnostics,
Chris Lattner [Thu, 16 Apr 2009 05:04:32 +0000 (05:04 +0000)]
move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp.  This simplifies warnings.cpp and makes it more
efficient.

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

15 years agoarrange for -Wno-error=foo warnings to be immune to -Werror as
Chris Lattner [Thu, 16 Apr 2009 04:32:54 +0000 (04:32 +0000)]
arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.

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

15 years agochange mappings to distinguish between "unset", "set by the user" and
Chris Lattner [Thu, 16 Apr 2009 04:12:40 +0000 (04:12 +0000)]
change mappings to distinguish between "unset", "set by the user" and
"set to the default value".

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

15 years agoDriver: Remove the majority of -W* options, the driver doesn't
Daniel Dunbar [Thu, 16 Apr 2009 04:00:30 +0000 (04:00 +0000)]
Driver: Remove the majority of -W* options, the driver doesn't
generally need to know about these now we don't have to hold
clang-cc's hand.

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

15 years agouse getDiagnosticLevel instead of getDiagnosticMapping, which
Chris Lattner [Thu, 16 Apr 2009 03:59:32 +0000 (03:59 +0000)]
use getDiagnosticLevel instead of getDiagnosticMapping, which
is about to become private.

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

15 years agoDriver: Forward -W* to clang, it can handle all these itself now.
Daniel Dunbar [Thu, 16 Apr 2009 03:44:10 +0000 (03:44 +0000)]
Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.

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

15 years agoswitch DiagMappings *back* to 4 bits per diag.
Chris Lattner [Thu, 16 Apr 2009 03:41:37 +0000 (03:41 +0000)]
switch DiagMappings *back* to 4 bits per diag.

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

15 years agoimplement -Wno-#warnings etc.
Chris Lattner [Thu, 16 Apr 2009 03:27:53 +0000 (03:27 +0000)]
implement -Wno-#warnings etc.

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

15 years agoEliminate pch::TYPE_ATTR, which is never used
Douglas Gregor [Thu, 16 Apr 2009 02:45:14 +0000 (02:45 +0000)]
Eliminate pch::TYPE_ATTR, which is never used

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

15 years agoPCH support for CompoundLiteralExpr. This is the last C expression
Douglas Gregor [Thu, 16 Apr 2009 02:33:48 +0000 (02:33 +0000)]
PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).

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

15 years agoPCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
Douglas Gregor [Thu, 16 Apr 2009 00:55:48 +0000 (00:55 +0000)]
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.

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

15 years agowhen tblgen fills in all the subgroup info, clang is ready for it.
Chris Lattner [Thu, 16 Apr 2009 00:53:55 +0000 (00:53 +0000)]
when tblgen fills in all the subgroup info, clang is ready for it.
This depends on r69249 of llvm.

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

15 years agoadd scafolding to represent heirarchical warnings, start with -Wall.
Chris Lattner [Thu, 16 Apr 2009 00:23:21 +0000 (00:23 +0000)]
add scafolding to represent heirarchical warnings, start with -Wall.

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

15 years agoAdd support for the __has_trivial_constructor type trait.
Anders Carlsson [Thu, 16 Apr 2009 00:08:20 +0000 (00:08 +0000)]
Add support for the __has_trivial_constructor type trait.

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

15 years agoPCH support for ShuffleVectorExpr and BlockDeclRefExpr
Douglas Gregor [Thu, 16 Apr 2009 00:01:45 +0000 (00:01 +0000)]
PCH support for ShuffleVectorExpr and BlockDeclRefExpr

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

15 years agoPCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.
Douglas Gregor [Wed, 15 Apr 2009 23:33:31 +0000 (23:33 +0000)]
PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.

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

15 years agoPCH support for ExtVectorElementExpr and VAArgExpr.
Douglas Gregor [Wed, 15 Apr 2009 23:02:49 +0000 (23:02 +0000)]
PCH support for ExtVectorElementExpr and VAArgExpr.

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

15 years agomake unknown warnings a warning, not an error.
Chris Lattner [Wed, 15 Apr 2009 22:48:58 +0000 (22:48 +0000)]
make unknown warnings a warning, not an error.

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

15 years agoadd anonymous groups for all the warning command line flags that the clang
Chris Lattner [Wed, 15 Apr 2009 22:47:03 +0000 (22:47 +0000)]
add anonymous groups for all the warning command line flags that the clang
driver accepts and discards.

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

15 years agoPCH support for CompoundAssignOperator and ConditionalOperator
Douglas Gregor [Wed, 15 Apr 2009 22:40:36 +0000 (22:40 +0000)]
PCH support for CompoundAssignOperator and ConditionalOperator

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

15 years agoadd support for -Wextra and -W
Chris Lattner [Wed, 15 Apr 2009 22:38:06 +0000 (22:38 +0000)]
add support for -Wextra and -W

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

15 years agocomment out IsGroup: tblgen isn't instantiating these dependent defs quite right...
Chris Lattner [Wed, 15 Apr 2009 22:32:37 +0000 (22:32 +0000)]
comment out IsGroup: tblgen isn't instantiating these dependent defs quite right yet.

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

15 years agoPCH support for ImaginaryLiteral and ArraySubscriptExpr
Douglas Gregor [Wed, 15 Apr 2009 22:19:53 +0000 (22:19 +0000)]
PCH support for ImaginaryLiteral and ArraySubscriptExpr

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

15 years agoFixup codegen for copy/dispose for block literals. Radar 6791245
Mike Stump [Wed, 15 Apr 2009 22:11:36 +0000 (22:11 +0000)]
Fixup codegen for copy/dispose for block literals.  Radar 6791245

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

15 years agoDefer generation of tentative definitions.
Daniel Dunbar [Wed, 15 Apr 2009 22:08:45 +0000 (22:08 +0000)]
Defer generation of tentative definitions.
 - PR3980.

 - <rdar://problem/6762287> [irgen] crash when generating tentative
   definition of incomplete structure

 - This also avoids creating common definitions for things which are
   later overwritten.

 - XFAIL'ed external-defs.c, it isn't completing types properly yet.

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

15 years agoPCH support for ExtQualType
Douglas Gregor [Wed, 15 Apr 2009 22:00:08 +0000 (22:00 +0000)]
PCH support for ExtQualType

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

15 years agoFix decl type merges when they have
Fariborz Jahanian [Wed, 15 Apr 2009 21:54:48 +0000 (21:54 +0000)]
Fix decl type merges when they have
__string/__weak attributes.

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

15 years agoSet DebugInfo at the beginning of GenerateBlockFunction().
Devang Patel [Wed, 15 Apr 2009 21:51:44 +0000 (21:51 +0000)]
Set DebugInfo at the beginning of GenerateBlockFunction().

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

15 years agoWhen declaring a variable that has a constructor and a direct initializer, for example:
Anders Carlsson [Wed, 15 Apr 2009 21:48:18 +0000 (21:48 +0000)]
When declaring a variable that has a constructor and a direct initializer, for example:

struct X {
  X(int, int);
};

X x(10, 10);

we model that as

X x = X(10, 10);

inserting a temporary object expr.

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

15 years agoAdd warning when a tentative array definition is assumed to have one element.
Daniel Dunbar [Wed, 15 Apr 2009 21:35:27 +0000 (21:35 +0000)]
Add warning when a tentative array definition is assumed to have one element.
 - Also, fixed one to actually be one (instead of zero). :)

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

15 years agoPCH support for declaration attributes
Douglas Gregor [Wed, 15 Apr 2009 21:30:51 +0000 (21:30 +0000)]
PCH support for declaration attributes

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

15 years agoActually generate code for the simple constructors we know we can generate code for.
Anders Carlsson [Wed, 15 Apr 2009 21:02:13 +0000 (21:02 +0000)]
Actually generate code for the simple constructors we know we can generate code for.

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

15 years agouse tablgen-generated warning groups.
Chris Lattner [Wed, 15 Apr 2009 20:58:49 +0000 (20:58 +0000)]
use tablgen-generated warning groups.

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

15 years agogenerate diagnostic group tables, this requires llvm r69219 or later.
Chris Lattner [Wed, 15 Apr 2009 20:55:31 +0000 (20:55 +0000)]
generate diagnostic group tables, this requires llvm r69219 or later.

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

15 years agofix a name shadowing problem in tblgen.
Chris Lattner [Wed, 15 Apr 2009 20:54:55 +0000 (20:54 +0000)]
fix a name shadowing problem in tblgen.

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

15 years agouse slightly more verbose to work around a tblgen bug for now.
Chris Lattner [Wed, 15 Apr 2009 20:29:48 +0000 (20:29 +0000)]
use slightly more verbose to work around a tblgen bug for now.

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

15 years agomove clang specific makefile goop to clang instead of llvm. This may require
Chris Lattner [Wed, 15 Apr 2009 19:58:08 +0000 (19:58 +0000)]
move clang specific makefile goop to clang instead of llvm.  This may require
updating the llvm tree.

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

15 years agoDon't use \01 in symbol name if unnecessary.
Daniel Dunbar [Wed, 15 Apr 2009 19:52:32 +0000 (19:52 +0000)]
Don't use \01 in symbol name if unnecessary.
 - This was particularly bad since I fixed one instance of this name
   and not another, meaning we got an LLVM module with the same
   effective name in two different globals!

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

15 years agoFix <rdar://problem/6786597> varargs not supported for Blocks under clang.
Steve Naroff [Wed, 15 Apr 2009 19:33:47 +0000 (19:33 +0000)]
Fix <rdar://problem/6786597> varargs not supported for Blocks under clang.

Teach Sema::SemaBuiltinVAStart() about blocks.

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

15 years agoPatch to remove a bogus warning which pointed to underlying AST
Fariborz Jahanian [Wed, 15 Apr 2009 19:19:03 +0000 (19:19 +0000)]
Patch to remove a bogus warning which pointed to underlying AST
gen. issue for property in continuation class declared readwrite
but which did not generate the declaration for the setter. Fix also
removed a FIXME and resulted in code cleanup.

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

15 years agoFix alignment on obj_msgrefs to match llvm-gcc.
Daniel Dunbar [Wed, 15 Apr 2009 19:04:46 +0000 (19:04 +0000)]
Fix alignment on obj_msgrefs to match llvm-gcc.

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

15 years agoAdd test case for superrefs section (and make spacing consistent).
Daniel Dunbar [Wed, 15 Apr 2009 19:03:14 +0000 (19:03 +0000)]
Add test case for superrefs section (and make spacing consistent).

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

15 years agofix some out of bounds array access problems, which manifest particularly
Chris Lattner [Wed, 15 Apr 2009 18:48:23 +0000 (18:48 +0000)]
fix some out of bounds array access problems, which manifest particularly
spectacularly when built for x86-64.

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

15 years agoPCH support for the string literal of a FileScopeAsmDecl.
Douglas Gregor [Wed, 15 Apr 2009 18:43:11 +0000 (18:43 +0000)]
PCH support for the string literal of a FileScopeAsmDecl.
Some minor cleanup.

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

15 years agomove some pp diags to the right .td file.
Chris Lattner [Wed, 15 Apr 2009 18:13:28 +0000 (18:13 +0000)]
move some pp diags to the right .td file.

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

15 years agoannotate diagnostics with which groups they belong to. Each
Chris Lattner [Wed, 15 Apr 2009 18:08:55 +0000 (18:08 +0000)]
annotate diagnostics with which groups they belong to.  Each
diagnostic can belong to at most one group.  Each group can
contain multiple diags, but we have nice syntax for the common
case of "1 diag to one group".

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

15 years agoFor source location entries that describe instantiations, encode the
Douglas Gregor [Wed, 15 Apr 2009 18:05:10 +0000 (18:05 +0000)]
For source location entries that describe instantiations, encode the
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.

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

15 years agoPCH support for MemberExpr and CallExpr.
Douglas Gregor [Wed, 15 Apr 2009 17:43:59 +0000 (17:43 +0000)]
PCH support for MemberExpr and CallExpr.

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

15 years agoFixup http://llvm.org/viewvc/llvm-project?rev=69165&view=rev (based on feedback from...
Steve Naroff [Wed, 15 Apr 2009 17:31:31 +0000 (17:31 +0000)]
Fixup http://llvm.org/viewvc/llvm-project?rev=69165&view=rev (based on feedback from Eli).

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

15 years agonow that we've decoupled diagnostic classes from default mappings,
Chris Lattner [Wed, 15 Apr 2009 17:20:11 +0000 (17:20 +0000)]
now that we've decoupled diagnostic classes from default mappings,
move the remaining default mapping exceptions from C++ code into
the .td files.

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

15 years agomove {'s
Chris Lattner [Wed, 15 Apr 2009 17:13:42 +0000 (17:13 +0000)]
move {'s

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

15 years agoRevert previous patch (will commit a fix soon).
Steve Naroff [Wed, 15 Apr 2009 16:58:41 +0000 (16:58 +0000)]
Revert previous patch (will commit a fix soon).

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

15 years agoMake diagnostic class explicit in the diag record instead of
Chris Lattner [Wed, 15 Apr 2009 16:56:26 +0000 (16:56 +0000)]
Make diagnostic class explicit in the diag record instead of
implicit from its parenting.  Now that diag mapping is
explicit, eliminate the fatal and extwarn classes.

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

15 years agoTblgen now passes the default mapping explicitly, instead of having it
Chris Lattner [Wed, 15 Apr 2009 16:44:12 +0000 (16:44 +0000)]
Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class.  This requires an LLVM tree update.

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

15 years agoadd a bunch of files.
Chris Lattner [Wed, 15 Apr 2009 16:43:37 +0000 (16:43 +0000)]
add a bunch of files.

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

15 years agoPCH support for string literals
Douglas Gregor [Wed, 15 Apr 2009 16:35:07 +0000 (16:35 +0000)]
PCH support for string literals

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

15 years agoDriver: Add --help-hidden
Daniel Dunbar [Wed, 15 Apr 2009 16:34:29 +0000 (16:34 +0000)]
Driver: Add --help-hidden

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

15 years ago__objc_superrefs belongs to __DATA segment.
Fariborz Jahanian [Wed, 15 Apr 2009 16:31:36 +0000 (16:31 +0000)]
__objc_superrefs belongs to __DATA segment.

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

15 years agoPCH support for UnaryOperator, SizeOfAlignOfExpr
Douglas Gregor [Wed, 15 Apr 2009 15:58:59 +0000 (15:58 +0000)]
PCH support for UnaryOperator, SizeOfAlignOfExpr

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

15 years agoStart attempting to generate code for C++ ctors.
Anders Carlsson [Wed, 15 Apr 2009 15:55:24 +0000 (15:55 +0000)]
Start attempting to generate code for C++ ctors.

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

15 years agoFix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not...
Steve Naroff [Wed, 15 Apr 2009 15:20:03 +0000 (15:20 +0000)]
Fix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not correct for __private_extern__.

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

15 years agorename variable in comment, not just in code :).
Chris Lattner [Wed, 15 Apr 2009 14:42:02 +0000 (14:42 +0000)]
rename variable in comment, not just in code :).

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

15 years agoFix <rdar://problem/6791490> [clang10 regression] [sema] invalid illegal jump diagnostic.
Steve Naroff [Wed, 15 Apr 2009 14:38:36 +0000 (14:38 +0000)]
Fix <rdar://problem/6791490> [clang10 regression] [sema] invalid illegal jump diagnostic.

caused by: <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed.

Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop).

Eli, please review (thanks).

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

15 years agothis should be private
Chris Lattner [Wed, 15 Apr 2009 07:06:34 +0000 (07:06 +0000)]
this should be private

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

15 years agoadd another sanity check for -Werror=xx
Chris Lattner [Wed, 15 Apr 2009 07:05:12 +0000 (07:05 +0000)]
add another sanity check for -Werror=xx

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

15 years agoadd a missing &&
Chris Lattner [Wed, 15 Apr 2009 07:03:57 +0000 (07:03 +0000)]
add a missing &&

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

15 years agofix a broken test, that passed for the wrong reason. Two wrongs make a right! :)
Chris Lattner [Wed, 15 Apr 2009 07:02:57 +0000 (07:02 +0000)]
fix a broken test, that passed for the wrong reason.  Two wrongs make a right! :)

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

15 years agoRejigger how -pedantic and -pedantic-errors work and their interaction
Chris Lattner [Wed, 15 Apr 2009 07:01:18 +0000 (07:01 +0000)]
Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping.  In the new scheme, -Wfoo or -Wno-foo or
-Werror=foo all override the -pedantic options, and __extension__
robustly silences all extension diagnostics in their scope.

An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array.  This also
substantially simplifies Diagnostic::getDiagnosticLevel.

OTOH, this temporarily introduces some "macro intensive" code in
Diagnostic.cpp.  This will be addressed in a later patch.

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

15 years agoImplement support for designated initializers that refer to members of
Douglas Gregor [Wed, 15 Apr 2009 06:41:24 +0000 (06:41 +0000)]
Implement support for designated initializers that refer to members of
anonymous structs or unions. Fixes PR3778.

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

15 years agoAdd support for mangling C++ constructors. Review appreciated (I'm looking at you...
Anders Carlsson [Wed, 15 Apr 2009 05:36:58 +0000 (05:36 +0000)]
Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)

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

15 years agomake default diagnostic mapping more explicit in .td file.
Chris Lattner [Wed, 15 Apr 2009 05:15:08 +0000 (05:15 +0000)]
make default diagnostic mapping more explicit in .td file.

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

15 years agoremove some commented out -Wstrict-selector-match stuff.
Chris Lattner [Wed, 15 Apr 2009 04:57:48 +0000 (04:57 +0000)]
remove some commented out -Wstrict-selector-match stuff.

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

15 years agoSwitch designated-initializer checking from using designator iterators
Douglas Gregor [Wed, 15 Apr 2009 04:56:10 +0000 (04:56 +0000)]
Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.

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

15 years agoDon't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream....
Douglas Gregor [Wed, 15 Apr 2009 04:54:29 +0000 (04:54 +0000)]
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this

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

15 years agoclean up error messages.
Chris Lattner [Wed, 15 Apr 2009 04:51:48 +0000 (04:51 +0000)]
clean up error messages.

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

15 years agoadd Diagnostic.td to proj
Chris Lattner [Wed, 15 Apr 2009 04:51:29 +0000 (04:51 +0000)]
add Diagnostic.td to proj

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

15 years agoAdd support for -Werror=foo and -Wno-error=foo
Chris Lattner [Wed, 15 Apr 2009 04:37:12 +0000 (04:37 +0000)]
Add support for -Werror=foo and -Wno-error=foo

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

15 years agoAdd CGCXX.h with ctor/dtor type enumerations. No functionality change.
Anders Carlsson [Wed, 15 Apr 2009 04:36:55 +0000 (04:36 +0000)]
Add CGCXX.h with ctor/dtor type enumerations. No functionality change.

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

15 years agorefactor a bunch of the warning parsing stuff to simplify it. This removes the
Chris Lattner [Wed, 15 Apr 2009 04:27:38 +0000 (04:27 +0000)]
refactor a bunch of the warning parsing stuff to simplify it.  This removes the
-Wfoo=ignore syntax.  GCC supports -Wno-foo, no need to invent our own stuff.

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

15 years agoremove #include of system header, making this a) not apple specific, and
Chris Lattner [Wed, 15 Apr 2009 04:26:10 +0000 (04:26 +0000)]
remove #include of system header, making this a) not apple specific, and
b) test dramatically faster.

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

15 years agoSimplify CodeGenFunction::GenerateCode.
Anders Carlsson [Wed, 15 Apr 2009 04:10:19 +0000 (04:10 +0000)]
Simplify CodeGenFunction::GenerateCode.

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

15 years agoremove dead code.
Zhongxing Xu [Wed, 15 Apr 2009 03:36:15 +0000 (03:36 +0000)]
remove dead code.

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

15 years agoTweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
Daniel Dunbar [Wed, 15 Apr 2009 02:56:18 +0000 (02:56 +0000)]
Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
 - Set alignment on property lists.
 - 32-bit:
   o Set section on property lists.
   o Fix section name for category class methods.
   o Fix symbol name for property lists.
   o Fix section name for class method.
   o Set alignment and section on class extension structure.
   o Set alignment on a number of things: instance variables, methods,
   method descriptions, the symbols structure.
 - 64-bit:
   o Fix section flags for protocol list.

I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.

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

15 years agoDriver: For clang, accept -fsigned-bitfields and reject
Daniel Dunbar [Wed, 15 Apr 2009 02:37:43 +0000 (02:37 +0000)]
Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
 - <rdar://problem/6790309> ER: Support
   -fsigned-bitfields/-funsigned-bitfields

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

15 years agoPCH support for CStyleCastExpr and BinaryOperator expression kinds.
Douglas Gregor [Wed, 15 Apr 2009 00:25:59 +0000 (00:25 +0000)]
PCH support for CStyleCastExpr and BinaryOperator expression kinds.

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

15 years agoImprove "assignment to cast" diagnostic.
Daniel Dunbar [Wed, 15 Apr 2009 00:08:05 +0000 (00:08 +0000)]
Improve "assignment to cast" diagnostic.
 - Strip off extra parens when looking for casts.
 - Change the location info to point at the cast (instead of the
   assignment).

For example, on

  int *b;
  #define a ((void*) b)
  void f0() {
    a = 10;
  }

we now emit:

  /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
    a = 10;
    ^ ~
  /tmp/t.c:2:12: note: instantiated from:
  #define a ((void*) b)
            ~^~~~~~~~~~

instead of:

  /tmp/t.c:4:5: error: expression is not assignable
    a = 10;
    ~ ^

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

15 years agoPCH support for ParenExpr
Douglas Gregor [Tue, 14 Apr 2009 23:59:37 +0000 (23:59 +0000)]
PCH support for ParenExpr

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

15 years agoAdd PCH support for ImplicitCastExprs. This is the first expression
Douglas Gregor [Tue, 14 Apr 2009 23:32:43 +0000 (23:32 +0000)]
Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.

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

15 years agoStrip paren expressions when trying to diagnose "cast as lvalue"
Daniel Dunbar [Tue, 14 Apr 2009 23:26:44 +0000 (23:26 +0000)]
Strip paren expressions when trying to diagnose "cast as lvalue"
extension.

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

15 years agoChange Lexer::MeasureTokenLength to take a LangOptions reference.
Chris Lattner [Tue, 14 Apr 2009 23:22:57 +0000 (23:22 +0000)]
Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:

t.cpp:8:13: error: unknown type name 'X'
static foo::X  P;
       ~~~~~^

instead of the woefully inferior:

t.cpp:8:13: error: unknown type name 'X'
static foo::X  P;
       ~~~~ ^

Most of this is just plumbing to push the reference around.

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

15 years agoDiagnose properties which have no implementations;
Fariborz Jahanian [Tue, 14 Apr 2009 23:15:21 +0000 (23:15 +0000)]
Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.

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

15 years agoSet alignment on __cstring metadata variables to 1 (matching
Daniel Dunbar [Tue, 14 Apr 2009 23:14:47 +0000 (23:14 +0000)]
Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).

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

15 years agoAvoid use of magic \01 prefix when unneeded.
Daniel Dunbar [Tue, 14 Apr 2009 22:44:26 +0000 (22:44 +0000)]
Avoid use of magic \01 prefix when unneeded.

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