]> granicus.if.org Git - clang/log
clang
15 years agoAdd noreturn for exit.
Mike Stump [Mon, 27 Jul 2009 19:14:18 +0000 (19:14 +0000)]
Add noreturn for exit.

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

15 years agoMake ObjCImplDecl inherit from ObjCContainerDecl.
Argyrios Kyrtzidis [Mon, 27 Jul 2009 19:04:32 +0000 (19:04 +0000)]
Make ObjCImplDecl inherit from ObjCContainerDecl.

ObjCContainerDecl now is the root class for objc decls that contain methods.

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

15 years agoTweak MultiTestRunner --path argument.
Daniel Dunbar [Mon, 27 Jul 2009 19:01:13 +0000 (19:01 +0000)]
Tweak MultiTestRunner --path argument.
 - Accept multiple values instead of embedding separator.
 - Make sure this gets used when searching for 'clang' binary.
 - Switch makefiles to using --path to stay in sync with cmake.

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

15 years agoUse DICompositeType->replaceAllUsesWith()
Devang Patel [Mon, 27 Jul 2009 18:42:03 +0000 (18:42 +0000)]
Use DICompositeType->replaceAllUsesWith()

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

15 years agoFix typo in error message
Douglas Gregor [Mon, 27 Jul 2009 18:33:18 +0000 (18:33 +0000)]
Fix typo in error message

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

15 years agoPrepare CMake regression testing for Daniel's upcoming fix to the test runner
Douglas Gregor [Mon, 27 Jul 2009 18:31:49 +0000 (18:31 +0000)]
Prepare CMake regression testing for Daniel's upcoming fix to the test runner

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

15 years agoWhen instantiating a variable without an initializer, call
Douglas Gregor [Mon, 27 Jul 2009 17:43:39 +0000 (17:43 +0000)]
When instantiating a variable without an initializer, call
ActOnUninitializedDecl.

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

15 years agoUse the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty...
Anders Carlsson [Mon, 27 Jul 2009 17:10:54 +0000 (17:10 +0000)]
Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.

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

15 years agoEnable the new struct type builder now that the constant struct builder works. (The...
Anders Carlsson [Mon, 27 Jul 2009 15:31:55 +0000 (15:31 +0000)]
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.

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

15 years agoFix a tail padding bug in the record layout builder code. The bug was found by an...
Anders Carlsson [Mon, 27 Jul 2009 14:55:54 +0000 (14:55 +0000)]
Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.

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

15 years agoEnable the new constant struct builder by default. The old code is still in place...
Anders Carlsson [Mon, 27 Jul 2009 05:54:15 +0000 (05:54 +0000)]
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.

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

15 years agoadd bugzilla #
Chris Lattner [Mon, 27 Jul 2009 04:49:58 +0000 (04:49 +0000)]
add bugzilla #

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

15 years agoMore work on the constant struct builder, fix a couple of thinkos and add support...
Anders Carlsson [Mon, 27 Jul 2009 02:56:37 +0000 (02:56 +0000)]
More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.

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

15 years agoMore work on bitfield support in the new constant struct builder.
Anders Carlsson [Mon, 27 Jul 2009 01:23:51 +0000 (01:23 +0000)]
More work on bitfield support in the new constant struct builder.

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

15 years agoFix PR4624.
Mike Stump [Mon, 27 Jul 2009 00:44:23 +0000 (00:44 +0000)]
Fix PR4624.

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

15 years agofix segfault (because of erasing after the vector boundaries) when the cached token...
Nuno Lopes [Sun, 26 Jul 2009 16:36:45 +0000 (16:36 +0000)]
fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end

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

15 years agoadd gentoo 2009.0 g++ header locations
Nuno Lopes [Sun, 26 Jul 2009 16:14:05 +0000 (16:14 +0000)]
add gentoo 2009.0 g++ header locations

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

15 years agoSwitch to getName()
Daniel Dunbar [Sun, 26 Jul 2009 09:28:40 +0000 (09:28 +0000)]
Switch to getName()

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

15 years agoSwitch to using llvm::Value::getName()
Daniel Dunbar [Sun, 26 Jul 2009 08:32:30 +0000 (08:32 +0000)]
Switch to using llvm::Value::getName()

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

15 years agoUpdate for API change.
Daniel Dunbar [Sun, 26 Jul 2009 02:21:04 +0000 (02:21 +0000)]
Update for API change.

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

15 years agoLookup targets by Triple instead of Module.
Daniel Dunbar [Sun, 26 Jul 2009 01:27:26 +0000 (01:27 +0000)]
Lookup targets by Triple instead of Module.

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

15 years agoPreserve qualifiers.
Mike Stump [Sat, 25 Jul 2009 23:24:03 +0000 (23:24 +0000)]
Preserve qualifiers.

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

15 years agoPR3575 - warn on declared variable or function attributes after a definition, which...
Ryan Flynn [Sat, 25 Jul 2009 22:29:44 +0000 (22:29 +0000)]
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.

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

15 years agoRefactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:16:03 +0000 (22:16 +0000)]
Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
ObjCImplDecl::getMethod.

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

15 years agoRefactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:51 +0000 (22:15 +0000)]
Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCInterfaceDecl::lookupMethod.

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

15 years agoRefactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:38 +0000 (22:15 +0000)]
Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCProtocolDecl::lookupMethod.

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

15 years agoRefactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:22 +0000 (22:15 +0000)]
Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
ObjCContainerDecl::getMethod.

Avoids code duplication.

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

15 years agoImprove comments (Thanks Fariborz).
Mike Stump [Sat, 25 Jul 2009 22:12:02 +0000 (22:12 +0000)]
Improve comments (Thanks Fariborz).

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

15 years agoAdd noreturn as a type attribute, handle printing for them and handle
Mike Stump [Sat, 25 Jul 2009 21:26:53 +0000 (21:26 +0000)]
Add noreturn as a type attribute, handle printing for them and handle
calls to noreturn function pointers when CFG building.

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

15 years agoir-gen for non-virtual base class initialization
Fariborz Jahanian [Sat, 25 Jul 2009 21:12:28 +0000 (21:12 +0000)]
ir-gen for non-virtual base class initialization
in constructors.

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

15 years agoImplement C++ semantics for C-style and functional-style casts. This regresses Clang...
Sebastian Redl [Sat, 25 Jul 2009 15:41:38 +0000 (15:41 +0000)]
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
Add custom conversions to static_cast.

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

15 years agoMultiTestRunner: Make sure to point at src dir, for out of tree builds.
Daniel Dunbar [Sat, 25 Jul 2009 15:26:08 +0000 (15:26 +0000)]
MultiTestRunner: Make sure to point at src dir, for out of tree builds.

Factor out routine for executing the script commands.

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

15 years agoMultiTestRunner: Cleanup test execution & output.
Daniel Dunbar [Sat, 25 Jul 2009 14:46:05 +0000 (14:46 +0000)]
MultiTestRunner: Cleanup test execution & output.
 - Stop writing everything to files.

 - Make test output more standard.

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

15 years agoMultiTestRunner: Drop external script and DejaGNU compatibility options for now.
Daniel Dunbar [Sat, 25 Jul 2009 13:19:40 +0000 (13:19 +0000)]
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
 - We don't use the former, and the latter doesn't actually work.

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

15 years agoMultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
Daniel Dunbar [Sat, 25 Jul 2009 13:13:06 +0000 (13:13 +0000)]
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
it currently.

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

15 years agoMultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
Daniel Dunbar [Sat, 25 Jul 2009 12:57:15 +0000 (12:57 +0000)]
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
files.

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

15 years agoMake having no RUN line a failure.
Daniel Dunbar [Sat, 25 Jul 2009 12:47:38 +0000 (12:47 +0000)]
Make having no RUN line a failure.

Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.

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

15 years agoRemove TESTDIR initialization, MultiTestRunner can find the test dirs itself.
Daniel Dunbar [Sat, 25 Jul 2009 12:44:58 +0000 (12:44 +0000)]
Remove TESTDIR initialization, MultiTestRunner can find the test dirs itself.

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

15 years agoRemove empty tests, left over from an svn revert.
Daniel Dunbar [Sat, 25 Jul 2009 12:41:25 +0000 (12:41 +0000)]
Remove empty tests, left over from an svn revert.

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

15 years agoRemove this Makefile, it is unused.
Daniel Dunbar [Sat, 25 Jul 2009 12:37:21 +0000 (12:37 +0000)]
Remove this Makefile, it is unused.

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

15 years agoMultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
Daniel Dunbar [Sat, 25 Jul 2009 12:23:35 +0000 (12:23 +0000)]
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...

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

15 years agoMultiTestRunner: Always use absolute path names for tests.
Daniel Dunbar [Sat, 25 Jul 2009 12:05:55 +0000 (12:05 +0000)]
MultiTestRunner: Always use absolute path names for tests.

Also, fix a function name I forgot to update.

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

15 years agoDisable this test: cxx-using-declaration.cpp
Daniel Dunbar [Sat, 25 Jul 2009 11:55:03 +0000 (11:55 +0000)]
Disable this test: cxx-using-declaration.cpp

Something strange is going on here; this test randomly started failing after
unrelated changes to TestRunner.py (even though it runs the same
script).

Argiris or Doug, can one of you investigate?

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

15 years agoMultiTestRunner: Validate '&&' at the end of RUN lines.
Daniel Dunbar [Sat, 25 Jul 2009 11:27:37 +0000 (11:27 +0000)]
MultiTestRunner: Validate '&&' at the end of RUN lines.
 - This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)

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

15 years agoMultiTestRunner: Explicitly define child environment, the only variable we need
Daniel Dunbar [Sat, 25 Jul 2009 10:14:19 +0000 (10:14 +0000)]
MultiTestRunner: Explicitly define child environment, the only variable we need
to import is the PATH.

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

15 years agoMultiTestRunner.py improvements.
Daniel Dunbar [Sat, 25 Jul 2009 09:53:43 +0000 (09:53 +0000)]
MultiTestRunner.py improvements.
 - Tweak output directories for temp files, derive the temporary base from the
   test's parent directory name, and the test name (instead of the whole path).

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

15 years agoMultiTestRunner.py improvements.
Daniel Dunbar [Sat, 25 Jul 2009 09:42:24 +0000 (09:42 +0000)]
MultiTestRunner.py improvements.
 - Not improved: the horribly lousy name. :)

 - Suppress stderr when capturing output.

 - Rewrite which() to do the right PATH search instead of being lazy and
   shelling out to 'which'.

 - On Windows, run scripts as batch files (via 'cmd /c ...').

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

15 years agoChange these tests to not depend as much on the name of the input.
Daniel Dunbar [Sat, 25 Jul 2009 09:01:12 +0000 (09:01 +0000)]
Change these tests to not depend as much on the name of the input.

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

15 years agoSemantic checking for main().
John McCall [Sat, 25 Jul 2009 04:36:53 +0000 (04:36 +0000)]
Semantic checking for main().

Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.

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

15 years agoFlesh out the QualifierSet API.
John McCall [Sat, 25 Jul 2009 04:35:50 +0000 (04:35 +0000)]
Flesh out the QualifierSet API.

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

15 years agoTweak svn:ignore
Daniel Dunbar [Sat, 25 Jul 2009 01:43:39 +0000 (01:43 +0000)]
Tweak svn:ignore

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

15 years agoMore work on the constant struct builder. We can now convert the struct to a packed...
Anders Carlsson [Sat, 25 Jul 2009 01:40:29 +0000 (01:40 +0000)]
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.

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

15 years agoSome code refactoring per Daniel's feedback.
Fariborz Jahanian [Sat, 25 Jul 2009 01:08:28 +0000 (01:08 +0000)]
Some code refactoring per Daniel's feedback.

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

15 years agoWhoops, did not mean to check this in.
Anders Carlsson [Sat, 25 Jul 2009 00:26:00 +0000 (00:26 +0000)]
Whoops, did not mean to check this in.

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

15 years agoMore work on the constant struct builder. We now try to layout all constant structs...
Anders Carlsson [Sat, 25 Jul 2009 00:24:56 +0000 (00:24 +0000)]
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Fri, 24 Jul 2009 23:12:58 +0000 (23:12 +0000)]
Update for LLVM API change.

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

15 years agoTemplate instantiation for static data members that are defined out-of-line.
Douglas Gregor [Fri, 24 Jul 2009 20:34:43 +0000 (20:34 +0000)]
Template instantiation for static data members that are defined out-of-line.

Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.

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

15 years agoFixes broken test by accident.
Fariborz Jahanian [Fri, 24 Jul 2009 20:33:35 +0000 (20:33 +0000)]
Fixes broken test by accident.

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

15 years agoMore Sema check for constructor's member initializer along
Fariborz Jahanian [Fri, 24 Jul 2009 20:28:49 +0000 (20:28 +0000)]
More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.

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

15 years agoIn the "use of floating point variable as loop counter" check, check
Ted Kremenek [Fri, 24 Jul 2009 20:26:31 +0000 (20:26 +0000)]
In the "use of floating point variable as loop counter" check, check
if the DeclRefExpr is a float, not just either argument.

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

15 years agoHave 'clang --analyze' run syntactic static analysis security checks.
Ted Kremenek [Fri, 24 Jul 2009 20:03:11 +0000 (20:03 +0000)]
Have 'clang --analyze' run syntactic static analysis security checks.

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

15 years agoFix 80-col violations, reflow a few comments and zap some extra
Mike Stump [Fri, 24 Jul 2009 19:02:52 +0000 (19:02 +0000)]
Fix 80-col violations, reflow a few comments and zap some extra
whitespace at ends of lines.

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

15 years agoFix a release build warning.
Anders Carlsson [Fri, 24 Jul 2009 18:20:38 +0000 (18:20 +0000)]
Fix a release build warning.

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

15 years agoMore work toward initialization of objects
Fariborz Jahanian [Fri, 24 Jul 2009 17:57:02 +0000 (17:57 +0000)]
More work toward initialization of objects
in constructors.

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

15 years agoAllow front-end 'isa' access on object's of type 'id'.
Steve Naroff [Fri, 24 Jul 2009 17:54:45 +0000 (17:54 +0000)]
Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).

Still need back-end CodeGen for ObjCIsaExpr.

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

15 years agoDon't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
Anders Carlsson [Fri, 24 Jul 2009 17:23:54 +0000 (17:23 +0000)]
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.

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

15 years agoCheck in a half finished new constant struct builder (Obviously not used yet).
Anders Carlsson [Fri, 24 Jul 2009 15:20:52 +0000 (15:20 +0000)]
Check in a half finished new constant struct builder (Obviously not used yet).

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

15 years agoFix declaration of obc_enumerationMutation function, for GNU runtime.
Daniel Dunbar [Fri, 24 Jul 2009 07:40:24 +0000 (07:40 +0000)]
Fix declaration of obc_enumerationMutation function, for GNU runtime.

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

15 years agoAdd doxygen comments and simplify expression.
Ted Kremenek [Fri, 24 Jul 2009 06:55:42 +0000 (06:55 +0000)]
Add doxygen comments and simplify expression.

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

15 years agoIntroduce a new variant type 'TryResult' to represent the result of
Ted Kremenek [Fri, 24 Jul 2009 04:47:11 +0000 (04:47 +0000)]
Introduce a new variant type 'TryResult' to represent the result of
TryEvaluateBool instead of using a raw 'int'.  This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.

Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.

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

15 years agoAdd getDecl() to CallGraph and CallGraphNode.
Zhongxing Xu [Fri, 24 Jul 2009 03:41:11 +0000 (03:41 +0000)]
Add getDecl() to CallGraph and CallGraphNode.

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

15 years agoConstify methods.
Zhongxing Xu [Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)]
Constify methods.

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

15 years agoTest commit: make a little stub routine for semantic checking of main().
John McCall [Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)]
Test commit:  make a little stub routine for semantic checking of main().

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

15 years agoEnable the '-warn-security-syntactic' checker option by default.
Ted Kremenek [Fri, 24 Jul 2009 02:52:07 +0000 (02:52 +0000)]
Enable the '-warn-security-syntactic' checker option by default.

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

15 years agoImplement new warning for functions declared 'noreturn' when they fall off the end.
Mike Stump [Fri, 24 Jul 2009 02:49:01 +0000 (02:49 +0000)]
Implement new warning for functions declared 'noreturn' when they fall off the end.

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

15 years agoGet rid of the size parameter to AppendField. No functionality change.
Anders Carlsson [Fri, 24 Jul 2009 02:45:50 +0000 (02:45 +0000)]
Get rid of the size parameter to AppendField. No functionality change.

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

15 years agoMark destructor of Checker virtual.
Ted Kremenek [Fri, 24 Jul 2009 00:40:31 +0000 (00:40 +0000)]
Mark destructor of Checker virtual.

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

15 years agoWe now do complete semantic checking for unions
Douglas Gregor [Fri, 24 Jul 2009 00:05:42 +0000 (00:05 +0000)]
We now do complete semantic checking for unions

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

15 years agoUpdate C++ status to reflect progress on out-of-line definitions of class template...
Douglas Gregor [Thu, 23 Jul 2009 23:58:15 +0000 (23:58 +0000)]
Update C++ status to reflect progress on out-of-line definitions of class template members

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

15 years agoThis patch fixes the implementations of the __has_trivial_destructor
Douglas Gregor [Thu, 23 Jul 2009 23:49:00 +0000 (23:49 +0000)]
This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!

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

15 years agoOutput UTF-16 string literals independent of host byte order.
Daniel Dunbar [Thu, 23 Jul 2009 23:41:22 +0000 (23:41 +0000)]
Output UTF-16 string literals independent of host byte order.
 - Steve, can you take a look at this? It seems like this code should live
   elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
   UTF-16 conversion.

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

15 years agoDiagnose when base classes and members to be intialized
Fariborz Jahanian [Thu, 23 Jul 2009 23:32:59 +0000 (23:32 +0000)]
Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.

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

15 years agoRefactor and push the evaluation as late as possible.
Mike Stump [Thu, 23 Jul 2009 23:25:26 +0000 (23:25 +0000)]
Refactor and push the evaluation as late as possible.

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

15 years agoFactor out map lookup for CFString constants.
Daniel Dunbar [Thu, 23 Jul 2009 22:52:48 +0000 (22:52 +0000)]
Factor out map lookup for CFString constants.

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

15 years agoDon't just store the field/bit field info one field, do it for all fields in the...
Anders Carlsson [Thu, 23 Jul 2009 22:52:34 +0000 (22:52 +0000)]
Don't just store the field/bit field info one field, do it for all fields in the union.

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

15 years agoSome cleanups suggested by Daniel.
Mike Stump [Thu, 23 Jul 2009 22:40:11 +0000 (22:40 +0000)]
Some cleanups suggested by Daniel.

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

15 years agoImplement: <rdar://problem/6335715> rule request: gets() buffer overflow
Ted Kremenek [Thu, 23 Jul 2009 22:29:41 +0000 (22:29 +0000)]
Implement: <rdar://problem/6335715> rule request: gets() buffer overflow

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

15 years agoFix another thinko.
Anders Carlsson [Thu, 23 Jul 2009 21:52:03 +0000 (21:52 +0000)]
Fix another thinko.

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

15 years agoAdd comments.
Ted Kremenek [Thu, 23 Jul 2009 21:44:18 +0000 (21:44 +0000)]
Add comments.

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

15 years agoRefine checking and diagnostics for use of floating point variable as a counter.
Ted Kremenek [Thu, 23 Jul 2009 21:34:35 +0000 (21:34 +0000)]
Refine checking and diagnostics for use of floating point variable as a counter.
This implements <rdar://problem/6336718> and checks for CERT secure coding
advisory FLP30-C.

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

15 years agoCorrect a thinko in bitfield layout code. Fixes PR4611.
Anders Carlsson [Thu, 23 Jul 2009 21:16:33 +0000 (21:16 +0000)]
Correct a  thinko in bitfield layout code. Fixes PR4611.

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

15 years agoSimplify, NFC.
Daniel Dunbar [Thu, 23 Jul 2009 20:38:28 +0000 (20:38 +0000)]
Simplify, NFC.

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

15 years agoSwitch the driver back to always using clang-cc by default (for C++, and
Daniel Dunbar [Thu, 23 Jul 2009 17:48:59 +0000 (17:48 +0000)]
Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
 - This is a good default for development & testing; for example without this
   any tests using 'clang' in the test suite will fail on PowerPC, since the
   driver will avoid using clang.

 - We don't want to actually ship something built this way, but that should be
   handled via some sort of configuration file.

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

15 years agoSimplify.
Daniel Dunbar [Thu, 23 Jul 2009 17:33:49 +0000 (17:33 +0000)]
Simplify.

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

15 years agoWe don't need to keep track of the packed alignment, just whether the struct is packe...
Anders Carlsson [Thu, 23 Jul 2009 17:24:40 +0000 (17:24 +0000)]
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

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

15 years agoMove the LLVM field number for bit fields into the BitFieldInfo structure, since...
Anders Carlsson [Thu, 23 Jul 2009 17:01:21 +0000 (17:01 +0000)]
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.

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

15 years agoClean up the ActOnTag action, so that there is only a single entry
Douglas Gregor [Thu, 23 Jul 2009 16:36:45 +0000 (16:36 +0000)]
Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.

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

15 years agoUnbreak the CMake build
Douglas Gregor [Thu, 23 Jul 2009 15:15:06 +0000 (15:15 +0000)]
Unbreak the CMake build

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

15 years agoAdd two nodes to the call graph:
Zhongxing Xu [Thu, 23 Jul 2009 13:39:38 +0000 (13:39 +0000)]
Add two nodes to the call graph:
 - Root is the main function or 0.
 - ExternalCallingNode has edges to all external functions.

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

15 years agoAdd template specializations to view the call graph in dot format.
Zhongxing Xu [Thu, 23 Jul 2009 09:04:23 +0000 (09:04 +0000)]
Add template specializations to view the call graph in dot format.
 - change the DenseMap used in callgraph to std::map, since DenseMap cannot
   be used with mapped_iterator and friends.

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