]> granicus.if.org Git - clang/log
clang
14 years agoFrontend/-H: Add comment on why I used a temporary string here.
Daniel Dunbar [Wed, 8 Sep 2010 18:19:55 +0000 (18:19 +0000)]
Frontend/-H: Add comment on why I used a temporary string here.

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

14 years agoMicrosoft's __uuidof operator implementation part 1.
Francois Pichet [Wed, 8 Sep 2010 12:20:18 +0000 (12:20 +0000)]
Microsoft's __uuidof operator implementation part 1.

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

14 years agoAllow type definitions inside anonymous struct/union in Microsoft mode.
Francois Pichet [Wed, 8 Sep 2010 11:32:25 +0000 (11:32 +0000)]
Allow type definitions inside anonymous struct/union in Microsoft mode.

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

14 years agoDon't give 'global constructor' warnings for function statics, even if they have...
Sebastian Redl [Wed, 8 Sep 2010 04:46:19 +0000 (04:46 +0000)]
Don't give 'global constructor' warnings for function statics, even if they have a direct initializer. Fixes PR8095.

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

14 years agoPut the tautological-comparison-of-unsigned-against-zero warnings in
John McCall [Wed, 8 Sep 2010 02:01:27 +0000 (02:01 +0000)]
Put the tautological-comparison-of-unsigned-against-zero warnings in
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.

Restoration of r112877.

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

14 years agoImplement ARM static local initialization guards, which are more compact than
John McCall [Wed, 8 Sep 2010 01:44:27 +0000 (01:44 +0000)]
Implement ARM static local initialization guards, which are more compact than
Itanium guards and use a slightly different compiled-in API.

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

14 years agoAllow (cv) void and incomplete arrays to be passed to the type traits.
Sebastian Redl [Wed, 8 Sep 2010 00:48:43 +0000 (00:48 +0000)]
Allow (cv) void and incomplete arrays to be passed to the type traits.

Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard.

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

14 years agoadd a fixit when 'main' does ot return 'int'; review welcome
Gabor Greif [Wed, 8 Sep 2010 00:31:13 +0000 (00:31 +0000)]
add a fixit when 'main' does ot return 'int'; review welcome

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

14 years agoProvide proper type-source location information for
Douglas Gregor [Wed, 8 Sep 2010 00:15:04 +0000 (00:15 +0000)]
Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.

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

14 years agoLocal static block variable referecned in its
Fariborz Jahanian [Tue, 7 Sep 2010 23:26:17 +0000 (23:26 +0000)]
Local static block variable referecned in its
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).

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

14 years agotests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.
Daniel Dunbar [Tue, 7 Sep 2010 22:54:28 +0000 (22:54 +0000)]
tests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.

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

14 years agoFix DeclPrinter to not include '=' in printing when no initializer is provided for...
Ted Kremenek [Tue, 7 Sep 2010 22:21:59 +0000 (22:21 +0000)]
Fix DeclPrinter to not include '=' in printing when no initializer is provided for a VarDecl.  Patch by Jim Goodnow II!

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

14 years agotypo
Gabor Greif [Tue, 7 Sep 2010 22:17:12 +0000 (22:17 +0000)]
typo

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

14 years agoImprove source-location information for CXXNewExpr, by hanging on to
Douglas Gregor [Tue, 7 Sep 2010 21:49:58 +0000 (21:49 +0000)]
Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.

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

14 years agoFix null pointer dereference in StreamChecker::Fseek (reported in PR 8081) and simpli...
Ted Kremenek [Tue, 7 Sep 2010 20:45:26 +0000 (20:45 +0000)]
Fix null pointer dereference in StreamChecker::Fseek (reported in PR 8081) and simplify surrounding checking logic.

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

14 years agoRe-enabled truncation/extension checking in IdempotentOperationChecker and added...
Tom Care [Tue, 7 Sep 2010 20:27:56 +0000 (20:27 +0000)]
Re-enabled truncation/extension checking in IdempotentOperationChecker and added a test case.

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

14 years agoAdd function attributes to the output of -ast-print-xml, from Martin Vejnar!
Douglas Gregor [Tue, 7 Sep 2010 20:16:43 +0000 (20:16 +0000)]
Add function attributes to the output of -ast-print-xml, from Martin Vejnar!

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

14 years agoget rid of a warning.
Fariborz Jahanian [Tue, 7 Sep 2010 19:57:04 +0000 (19:57 +0000)]
get rid of a warning.

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

14 years agoHave Sema check for validity of CGString literal
Fariborz Jahanian [Tue, 7 Sep 2010 19:38:13 +0000 (19:38 +0000)]
Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.

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

14 years agoAllow 'o' and 'V' as constraints for output asm operands.
Dale Johannesen [Tue, 7 Sep 2010 18:40:41 +0000 (18:40 +0000)]
Allow 'o' and 'V' as constraints for output asm operands.
Allow '<' and '>' as constraints for input or output.

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

14 years agoImprove error recovery when we see ':' and expect a ';'.
John McCall [Tue, 7 Sep 2010 18:31:03 +0000 (18:31 +0000)]
Improve error recovery when we see ':' and expect a ';'.
I, at least, make this typo all the time.

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

14 years agoAdjust a test that's expecting optimizations to be done
Dale Johannesen [Tue, 7 Sep 2010 18:11:53 +0000 (18:11 +0000)]
Adjust a test that's expecting optimizations to be done
on MMX palignr; we don't do this for the intrinsics.

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

14 years agoDriver/Darwin: Catch another case where ld ends up using ld_classic.
Daniel Dunbar [Tue, 7 Sep 2010 17:50:41 +0000 (17:50 +0000)]
Driver/Darwin: Catch another case where ld ends up using ld_classic.

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

14 years agoDriver/Darwin: Don't pass -demangle to the linker when we know it is going to
Daniel Dunbar [Tue, 7 Sep 2010 17:07:49 +0000 (17:07 +0000)]
Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.

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

14 years agoProvide a specific diagnostic when trying to redefine an "extern
Douglas Gregor [Tue, 7 Sep 2010 15:51:01 +0000 (15:51 +0000)]
Provide a specific diagnostic when trying to redefine an "extern
inline" function outside of GNU89 mode. Fixes
<rdar://problem/6880464>.

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

14 years agoImprove recovery when there is a stray ']' or ')' before the ';' at
Douglas Gregor [Tue, 7 Sep 2010 15:23:11 +0000 (15:23 +0000)]
Improve recovery when there is a stray ']' or ')' before the ';' at
the end of a statement. Fixes <rdar://problem/6896493>.

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

14 years agoImprove recovery when a comma is missing between enumerators in an
Douglas Gregor [Tue, 7 Sep 2010 14:51:08 +0000 (14:51 +0000)]
Improve recovery when a comma is missing between enumerators in an
enumeration definition. Fixes <rdar://problem/7159693>.

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

14 years agoImprove diagnostic and recovery when missing a comma between base or
Douglas Gregor [Tue, 7 Sep 2010 14:35:10 +0000 (14:35 +0000)]
Improve diagnostic and recovery when missing a comma between base or
member initializers in a C++ constructor. Fixes <rdar://problem/7796492>.

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

14 years agoReplace loops with SmallVector::append.
Benjamin Kramer [Mon, 6 Sep 2010 23:43:28 +0000 (23:43 +0000)]
Replace loops with SmallVector::append.

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

14 years agoDue to asmparser improvements, this error message is now better
Chris Lattner [Mon, 6 Sep 2010 22:09:27 +0000 (22:09 +0000)]
Due to asmparser improvements, this error message is now better

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

14 years agoFix a C++ PCH problem which was exposed by r113019. CXXBaseOrMemberInitializer's...
Argyrios Kyrtzidis [Mon, 6 Sep 2010 19:04:27 +0000 (19:04 +0000)]
Fix a C++ PCH problem which was exposed by r113019. CXXBaseOrMemberInitializer's IsWritten and source order is not set.

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

14 years agoremove curly quotes, patch by Dimitry Andric!
Chris Lattner [Mon, 6 Sep 2010 17:52:29 +0000 (17:52 +0000)]
remove curly quotes, patch by Dimitry Andric!

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

14 years agoLastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed...
Argyrios Kyrtzidis [Mon, 6 Sep 2010 12:00:10 +0000 (12:00 +0000)]
LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).

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

14 years agoFinishBlock() is essentially doing nothing except returning '!badCFG'.
Zhongxing Xu [Mon, 6 Sep 2010 07:32:31 +0000 (07:32 +0000)]
FinishBlock() is essentially doing nothing except returning '!badCFG'.

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

14 years agoSimplify CFG construction: bail out early when we have a bad CFG.
Zhongxing Xu [Mon, 6 Sep 2010 07:04:06 +0000 (07:04 +0000)]
Simplify CFG construction: bail out early when we have a bad CFG.

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

14 years agoMake "-ccc-cxx" option work on Linux.
Rafael Espindola [Mon, 6 Sep 2010 02:36:23 +0000 (02:36 +0000)]
Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

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

14 years agoGet rid of unnecessary return.
Eli Friedman [Mon, 6 Sep 2010 00:31:37 +0000 (00:31 +0000)]
Get rid of unnecessary return.

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

14 years agoUpdate test for r113128.
Eli Friedman [Mon, 6 Sep 2010 00:30:50 +0000 (00:30 +0000)]
Update test for r113128.

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

14 years agomove the hackaround for PR6537 to catch unions as well,
Chris Lattner [Mon, 6 Sep 2010 00:13:11 +0000 (00:13 +0000)]
move the hackaround for PR6537 to catch unions as well,
fixing the ICE in PR7151

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

14 years agoclean up some formatting.
Chris Lattner [Mon, 6 Sep 2010 00:11:41 +0000 (00:11 +0000)]
clean up some formatting.

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

14 years agoPR7242: Make sure to use a different context for evaluating constant
Eli Friedman [Mon, 6 Sep 2010 00:10:32 +0000 (00:10 +0000)]
PR7242: Make sure to use a different context for evaluating constant
initializers, so the result of the evaluation doesn't leak through
inconsistently.  Also, don't evaluate references to variables with
initializers with side-effects.

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

14 years agofix PR7192 by defining wchar_t in a more conventional way. The
Chris Lattner [Sun, 5 Sep 2010 23:29:49 +0000 (23:29 +0000)]
fix PR7192 by defining wchar_t in a more conventional way.  The
type of L"x" can change based on command line arguments.

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

14 years agoTell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try...
Steven Watanabe [Sun, 5 Sep 2010 23:16:22 +0000 (23:16 +0000)]
Tell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try to define them as typedefs.

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

14 years agofix 7320: we can't delete a trailing space if it doesn't exist.
Chris Lattner [Sun, 5 Sep 2010 23:16:09 +0000 (23:16 +0000)]
fix 7320: we can't delete a trailing space if it doesn't exist.

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

14 years agoPR8023: Don't crash on invalid uses of __real__ on class types in C++.
Eli Friedman [Sun, 5 Sep 2010 23:15:52 +0000 (23:15 +0000)]
PR8023: Don't crash on invalid uses of __real__ on class types in C++.

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

14 years agoNo functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
Nick Lewycky [Sun, 5 Sep 2010 03:40:33 +0000 (03:40 +0000)]
No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
David Vandevoorde's name correctly.

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

14 years ago"const id<NSFoo> *" instead of "id<NSFoo> const *".
Chris Lattner [Sun, 5 Sep 2010 00:43:21 +0000 (00:43 +0000)]
"const id<NSFoo> *" instead of "id<NSFoo> const *".

I think this wraps up all the legal cases.

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

14 years ago"const id<NSFoo> *" not "id<NSFoo> const*"
Chris Lattner [Sun, 5 Sep 2010 00:36:44 +0000 (00:36 +0000)]
"const id<NSFoo> *" not "id<NSFoo> const*"

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

14 years ago"const std::vector<int>*" not "std::vector<int> const*"
Chris Lattner [Sun, 5 Sep 2010 00:27:00 +0000 (00:27 +0000)]
"const std::vector<int>*" not "std::vector<int> const*"

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

14 years ago"const _Complex float *" not "_Complex float const *"
Chris Lattner [Sun, 5 Sep 2010 00:22:25 +0000 (00:22 +0000)]
"const _Complex float *" not "_Complex float const *"

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

14 years ago'const std::type_info*' instead of 'std::type_info const*'
Chris Lattner [Sun, 5 Sep 2010 00:17:29 +0000 (00:17 +0000)]
'const std::type_info*' instead of 'std::type_info const*'

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

14 years agoprint "const intptr_t" instead of "intptr_t const"
Chris Lattner [Sun, 5 Sep 2010 00:07:29 +0000 (00:07 +0000)]
print "const intptr_t" instead of "intptr_t const"

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

14 years agomake clang print types as "const int *" instead of "int const*",
Chris Lattner [Sun, 5 Sep 2010 00:04:01 +0000 (00:04 +0000)]
make clang print types as "const int *" instead of "int const*",
which is should have done from the beginning.  As usual, the most
fun with this sort of change is updating all the testcases.

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

14 years agorevert this, it isn't safe.
Chris Lattner [Sat, 4 Sep 2010 23:43:40 +0000 (23:43 +0000)]
revert this, it isn't safe.

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

14 years agotidy up
Chris Lattner [Sat, 4 Sep 2010 23:37:43 +0000 (23:37 +0000)]
tidy up

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

14 years agorevise r112365 to fix the actual problem: the isa<TagType>(Underlying)
Chris Lattner [Sat, 4 Sep 2010 23:16:01 +0000 (23:16 +0000)]
revise r112365 to fix the actual problem: the isa<TagType>(Underlying)
check in the "typedef for anonymous type" check should have been a
getAs.

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

14 years agoCasting of a property reference to 'void' did not
Fariborz Jahanian [Sat, 4 Sep 2010 19:49:18 +0000 (19:49 +0000)]
Casting of a property reference to 'void' did not
generate the necessary code. This patch fixes it.
// rdar://8389655

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

14 years agozap more dead code.
Chris Lattner [Sat, 4 Sep 2010 18:19:08 +0000 (18:19 +0000)]
zap more dead code.

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

14 years agozap dead code.
Chris Lattner [Sat, 4 Sep 2010 18:12:20 +0000 (18:12 +0000)]
zap dead code.

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

14 years agoPetty optimization.
John McCall [Sat, 4 Sep 2010 01:26:37 +0000 (01:26 +0000)]
Petty optimization.

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

14 years agofix a crash in RecursiveASTVisitor's child classes (PR8403); reviewed by chandlerc.
Zhanyong Wan [Fri, 3 Sep 2010 23:50:56 +0000 (23:50 +0000)]
fix a crash in RecursiveASTVisitor's child classes (PR8403); reviewed by chandlerc.

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

14 years agoSynchronize code-completion cursor kinds with indexing cursor
Douglas Gregor [Fri, 3 Sep 2010 23:30:36 +0000 (23:30 +0000)]
Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!

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

14 years agoTruncate block variable of bool type to i1 when its
Fariborz Jahanian [Fri, 3 Sep 2010 23:07:53 +0000 (23:07 +0000)]
Truncate block variable of bool type to i1 when its
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).

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

14 years agoFix PR7402 when it strikes via template instantiation.
Chandler Carruth [Fri, 3 Sep 2010 21:54:20 +0000 (21:54 +0000)]
Fix PR7402 when it strikes via template instantiation.

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

14 years agoIt's OK for classes to have flexible array elements (but not unions).
Anders Carlsson [Fri, 3 Sep 2010 21:53:49 +0000 (21:53 +0000)]
It's OK for classes to have flexible array elements (but not unions).

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

14 years agoCope with llvm's reference to bool type of 'i1' vs. clang's
Fariborz Jahanian [Fri, 3 Sep 2010 21:36:02 +0000 (21:36 +0000)]
Cope with llvm's reference to bool type of 'i1' vs. clang's
type of 'i8' for the same for __block variables of
type bool. refixes radar 8382559.

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

14 years agoClean up some whitespace and comments from this test that were remnants of
Chandler Carruth [Fri, 3 Sep 2010 21:17:53 +0000 (21:17 +0000)]
Clean up some whitespace and comments from this test that were remnants of
a previous iteration of the test.

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

14 years agoAllow anonymous and local types. The support was already in place for these,
Chandler Carruth [Fri, 3 Sep 2010 21:12:34 +0000 (21:12 +0000)]
Allow anonymous and local types. The support was already in place for these,
but this makes them work even as an extension in C++98. This resolves PR8077.

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

14 years agoA constant initializer never matches the type of the variable it's
John McCall [Fri, 3 Sep 2010 18:58:50 +0000 (18:58 +0000)]
A constant initializer never matches the type of the variable it's
initializing;  it at best matches the element type of the variable
it's initializing.  Fixes PR8073.

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

14 years agoImplement libclang visitation for UnresolvedMemberExpr. This is the
Douglas Gregor [Fri, 3 Sep 2010 18:01:25 +0000 (18:01 +0000)]
Implement libclang visitation for UnresolvedMemberExpr. This is the
last of the C++-specific expressions where we have decent source
information in the AST already. In particular, various
object-construction expressions (CXXNewExpr, CXXTemporaryObjectExpr)
still have poor source-location information that needs to be addressed.

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

14 years agoupdate svn:ignore
Nuno Lopes [Fri, 3 Sep 2010 18:01:10 +0000 (18:01 +0000)]
update svn:ignore

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

14 years agoUse std::string instead of llvm::StringRef to avoid dangling ref.
Fariborz Jahanian [Fri, 3 Sep 2010 18:01:09 +0000 (18:01 +0000)]
Use std::string instead of llvm::StringRef to avoid dangling ref.
Per Chris's comment.

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

14 years agolibclang visitation for CXXDependentScopeMemberExpr
Douglas Gregor [Fri, 3 Sep 2010 17:35:34 +0000 (17:35 +0000)]
libclang visitation for CXXDependentScopeMemberExpr

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

14 years agoUse getSpelling to get original text of the
Fariborz Jahanian [Fri, 3 Sep 2010 17:33:04 +0000 (17:33 +0000)]
Use getSpelling to get original text of the
c++ operator token. (radar 8328250).

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

14 years agolibclang visitation for DependentScopeDeclRefExpr
Douglas Gregor [Fri, 3 Sep 2010 17:24:10 +0000 (17:24 +0000)]
libclang visitation for DependentScopeDeclRefExpr

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

14 years agoAdd missing #include
Douglas Gregor [Fri, 3 Sep 2010 17:16:03 +0000 (17:16 +0000)]
Add missing #include

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

14 years agoPut the info on testing from the command line into its own section
Dawn Perchik [Fri, 3 Sep 2010 17:01:13 +0000 (17:01 +0000)]
Put the info on testing from the command line into its own section
titled "Testing on the Command Line".

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

14 years agofix a hard coded version number, PR8031. Patch by 'nobled'.
Chris Lattner [Fri, 3 Sep 2010 16:47:03 +0000 (16:47 +0000)]
fix a hard coded version number, PR8031.  Patch by 'nobled'.

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

14 years agofix lookup of bits/c++config.h on mingw, patch by Ismail Donmez!
Chris Lattner [Fri, 3 Sep 2010 16:45:53 +0000 (16:45 +0000)]
fix lookup of bits/c++config.h on mingw, patch by Ismail Donmez!

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

14 years agoSimplify code-completion result sorting a bit
Douglas Gregor [Fri, 3 Sep 2010 16:23:44 +0000 (16:23 +0000)]
Simplify code-completion result sorting a bit

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

14 years agoRemove end-of-line translation properties from test, in the hopes of fixing this...
Douglas Gregor [Fri, 3 Sep 2010 15:59:27 +0000 (15:59 +0000)]
Remove end-of-line translation properties from test, in the hopes of fixing this test on Windows

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

14 years agoAvoid unnecessary redirect, so that stderr shows up in output.
Daniel Dunbar [Fri, 3 Sep 2010 15:45:00 +0000 (15:45 +0000)]
Avoid unnecessary redirect, so that stderr shows up in output.

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

14 years agoFirst test commit by Francois Pichet. _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES is not...
Francois Pichet [Fri, 3 Sep 2010 08:42:01 +0000 (08:42 +0000)]
First test commit by Francois Pichet. _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES is not a predefined macro, remove it.

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

14 years agoUpdate the internals manual for the removal of Action, as well as other
John McCall [Fri, 3 Sep 2010 05:07:55 +0000 (05:07 +0000)]
Update the internals manual for the removal of Action, as well as other
changes that are much older.

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

14 years agoAdd a quick-and-dirty hack to give a better diagnostic for [class.protected]
John McCall [Fri, 3 Sep 2010 04:56:05 +0000 (04:56 +0000)]
Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
restrictions.  The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.

There are corner cases where this can be wrong, but I'm not concerned.

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

14 years ago"I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment
Chris Lattner [Fri, 3 Sep 2010 04:34:38 +0000 (04:34 +0000)]
"I see dead code".  IdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's useful

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

14 years agoDevirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.
John McCall [Fri, 3 Sep 2010 02:10:08 +0000 (02:10 +0000)]
Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.

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

14 years agoIRgen: Fix silly thinko in r112021, which was generating code for the same expr
Daniel Dunbar [Fri, 3 Sep 2010 02:07:00 +0000 (02:07 +0000)]
IRgen: Fix silly thinko in r112021, which was generating code for the same expr
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.

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

14 years agoAdd symantic support for the Pascal calling convention via
Dawn Perchik [Fri, 3 Sep 2010 01:29:35 +0000 (01:29 +0000)]
Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions).  Support still needs to be added to llvm.

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

14 years agoTranslate NEON vabdl, vaba, and vabal builtins to be implemented using the
Bob Wilson [Fri, 3 Sep 2010 01:27:09 +0000 (01:27 +0000)]
Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
vabd intrinsic combined with zext and add operations.

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

14 years agoRe-commit r112916 with an additional fix for the self-host failures.
John McCall [Fri, 3 Sep 2010 01:26:39 +0000 (01:26 +0000)]
Re-commit r112916 with an additional fix for the self-host failures.
I've audited the remaining getFunctionInfo call sites.

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

14 years agoPatch to allow alternative representation of c++
Fariborz Jahanian [Fri, 3 Sep 2010 01:26:16 +0000 (01:26 +0000)]
Patch to allow alternative representation of c++
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.

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

14 years agoStatic local variables don't result in global constructors being emitted.
Anders Carlsson [Fri, 3 Sep 2010 01:11:38 +0000 (01:11 +0000)]
Static local variables don't result in global constructors being emitted.

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

14 years agoSupport pointer arithmetic in SimpleSValuator involving direct constants.
Ted Kremenek [Fri, 3 Sep 2010 01:07:06 +0000 (01:07 +0000)]
Support pointer arithmetic in SimpleSValuator involving direct constants.

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

14 years agoRemove bogus assertions.
Ted Kremenek [Fri, 3 Sep 2010 01:07:04 +0000 (01:07 +0000)]
Remove bogus assertions.

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

14 years agoAdd optional record of "location" SVals in the environment. When we analyzing loads...
Ted Kremenek [Fri, 3 Sep 2010 01:07:02 +0000 (01:07 +0000)]
Add optional record of "location" SVals in the environment.  When we analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics).  This is prep for pending changes to GRExprEngine.

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

14 years agoAdd GRState::getSimplifiedSVal(), which provides an API hook for doing symbol ->...
Ted Kremenek [Fri, 3 Sep 2010 01:06:58 +0000 (01:06 +0000)]
Add GRState::getSimplifiedSVal(), which provides an API hook for doing symbol -> constant folding.  This isn't used yet, but
is prep for some pending optimizations in GRExprEngine.

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

14 years agoFix enum: CallEnter/CallExit are StmtPoints
Ted Kremenek [Fri, 3 Sep 2010 01:06:44 +0000 (01:06 +0000)]
Fix enum: CallEnter/CallExit are StmtPoints

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

14 years agoRemove now unused function.
Anders Carlsson [Fri, 3 Sep 2010 00:51:09 +0000 (00:51 +0000)]
Remove now unused function.

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

14 years agoFix a typo.
Daniel Dunbar [Fri, 3 Sep 2010 00:41:43 +0000 (00:41 +0000)]
Fix a typo.

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