]> granicus.if.org Git - clang/log
clang
16 years agolibAnalysis:
Ted Kremenek [Thu, 18 Jun 2009 22:57:13 +0000 (22:57 +0000)]
libAnalysis:
- Remove the 'isFeasible' flag from all uses of 'Assume'.
- Remove the 'Assume' methods from GRStateManager.  Now the only way to
  create a new GRState with an assumption is to use the new 'assume' methods
  in GRState.

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

16 years agoSome cleanups suggested by Chris
Douglas Gregor [Thu, 18 Jun 2009 18:45:36 +0000 (18:45 +0000)]
Some cleanups suggested by Chris

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

16 years agoMove the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
Douglas Gregor [Thu, 18 Jun 2009 16:11:24 +0000 (16:11 +0000)]
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.

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

16 years agoAdd some missing CMake dependencies
Douglas Gregor [Thu, 18 Jun 2009 15:05:47 +0000 (15:05 +0000)]
Add some missing CMake dependencies

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

16 years agoModify test case comments.
Zhongxing Xu [Thu, 18 Jun 2009 06:49:35 +0000 (06:49 +0000)]
Modify test case comments.

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

16 years agoWhen casting region, if we do not create an element region, record the cast-to
Zhongxing Xu [Thu, 18 Jun 2009 06:29:10 +0000 (06:29 +0000)]
When casting region, if we do not create an element region, record the cast-to
type.

When retrieving the region value, if we are going to create a symbol value, use
the cast-to type if possible.

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

16 years agoFix a crash that can occur when a #pragma handler eats to the end of the
Chris Lattner [Thu, 18 Jun 2009 05:55:53 +0000 (05:55 +0000)]
Fix a crash that can occur when a #pragma handler eats to the end of the
line, and when the pragma is at the end of a file.  In this case, the last
token consumed could pop the lexer, invalidating CurPPLexer.  Thanks to
Peter Thoman for pointing it out.

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

16 years agoMore GRStateRef removal fix.
Zhongxing Xu [Thu, 18 Jun 2009 03:42:19 +0000 (03:42 +0000)]
More GRStateRef removal fix.

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

16 years agoAdd a target triple to a couple of tests which depend on it. Reported
Eli Friedman [Thu, 18 Jun 2009 02:04:19 +0000 (02:04 +0000)]
Add a target triple to a couple of tests which depend on it.  Reported
by Mark Cianciosa on cfe-dev.

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

16 years agoRemove GRStateRef.
Ted Kremenek [Thu, 18 Jun 2009 01:33:24 +0000 (01:33 +0000)]
Remove GRStateRef.

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

16 years agoRemove more dependencies on GRStateRef. As a consequence, we can now
Ted Kremenek [Thu, 18 Jun 2009 01:23:53 +0000 (01:23 +0000)]
Remove more dependencies on GRStateRef.  As a consequence, we can now
pretty-print a GRState object anywhere it is referenced (instead of
needing a GRStateRef of a GRStateManager handy).

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

16 years agoRemove another dependency on GRStateRef.
Ted Kremenek [Thu, 18 Jun 2009 00:49:02 +0000 (00:49 +0000)]
Remove another dependency on GRStateRef.

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

16 years agoDiagnose class members that shadow a template parameter. Fixes
Douglas Gregor [Wed, 17 Jun 2009 23:37:01 +0000 (23:37 +0000)]
Diagnose class members that shadow a template parameter. Fixes
<rdar://problem/6952203>.

To do this, we actually remove a not-quite-correct optimization in the
C++ name lookup routines. We'll revisit this optimization for the
general case once more C++ is working.

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

16 years agoFix regression testing in Xcode, again
Douglas Gregor [Wed, 17 Jun 2009 23:35:04 +0000 (23:35 +0000)]
Fix regression testing in Xcode, again

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

16 years agoFix some erroneous comments due to trigger-happy copy&paste.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 23:19:02 +0000 (23:19 +0000)]
Fix some erroneous comments due to trigger-happy copy&paste.

No functionality change.

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

16 years agoFactor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 23:15:40 +0000 (23:15 +0000)]
Factor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext.

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

16 years agoImplement correct name lookup inside an initializer of a C++ class static data member.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 22:50:06 +0000 (22:50 +0000)]
Implement correct name lookup inside an initializer of a C++ class static data member.

Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case.

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

16 years agoMove CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 22:49:50 +0000 (22:49 +0000)]
Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

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

16 years agoRemoved deadcode related to addition of constructor
Fariborz Jahanian [Wed, 17 Jun 2009 22:44:31 +0000 (22:44 +0000)]
Removed deadcode related to addition of constructor
decls to a class.

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

16 years agoFirst step toward fixing <rdar://problem/6613046> refactor clang objc type representa...
Steve Naroff [Wed, 17 Jun 2009 22:40:22 +0000 (22:40 +0000)]
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.

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

16 years agoRemove more uses of GRStateRef.
Ted Kremenek [Wed, 17 Jun 2009 22:28:13 +0000 (22:28 +0000)]
Remove more uses of GRStateRef.

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

16 years agoClass 'Environment' no longer should subclass llvm::FoldingSetNode.
Ted Kremenek [Wed, 17 Jun 2009 22:06:03 +0000 (22:06 +0000)]
Class 'Environment' no longer should subclass llvm::FoldingSetNode.
Environment hasn't been uniqued in a FoldingSet for some time, so this
was just wasting a pointer in GRState.

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

16 years agoStart moving in the direction of removing GRStateRef. Now each
Ted Kremenek [Wed, 17 Jun 2009 22:02:04 +0000 (22:02 +0000)]
Start moving in the direction of removing GRStateRef.  Now each
GRState object has a direct reference to its GRStateManager, making
the functionality of GRStateRef redunandant.  This will lead to some
nice API cleanup and code shrinking across libAnalysis.

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

16 years agoSupport dependent extended vector types and template instantiation
Douglas Gregor [Wed, 17 Jun 2009 21:51:59 +0000 (21:51 +0000)]
Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!

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

16 years agoTesting improvements:
Daniel Dunbar [Wed, 17 Jun 2009 21:33:37 +0000 (21:33 +0000)]
Testing improvements:
 - Make python test runner force COLUMNS=0 to increase determinism.

 - Substitute clang-cc as we do for clang.

 - Improved detection of Ctrl-C.

 - Honor CLANG and CLANGCC environment variables.

 - Add proper command line arguments to TestRunner.py (see --help)

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

16 years agoSearch path for 64-bit Ubuntu Linux, from Anders Johnsen
Douglas Gregor [Wed, 17 Jun 2009 21:18:36 +0000 (21:18 +0000)]
Search path for 64-bit Ubuntu Linux, from Anders Johnsen

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

16 years agoAdded missing @endcode.
Fariborz Jahanian [Wed, 17 Jun 2009 20:24:52 +0000 (20:24 +0000)]
Added missing @endcode.

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

16 years agoDiagnose the use of attributes on namespace aliases, from Anis Ahmad
Douglas Gregor [Wed, 17 Jun 2009 19:49:00 +0000 (19:49 +0000)]
Diagnose the use of attributes on namespace aliases, from Anis Ahmad

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

16 years agoMake sure that .td and .def files get into the list of headers in a CMake build,...
Douglas Gregor [Wed, 17 Jun 2009 18:31:02 +0000 (18:31 +0000)]
Make sure that .td and .def files get into the list of headers in a CMake build, for use in Xcode and Visual Studio

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

16 years agolink in targets
Chris Lattner [Wed, 17 Jun 2009 17:25:50 +0000 (17:25 +0000)]
link in targets

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

16 years agoRemove old #includes
Chris Lattner [Wed, 17 Jun 2009 17:23:16 +0000 (17:23 +0000)]
Remove old #includes

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

16 years agoUse env properly in test/Driver/analyze.c
Douglas Gregor [Wed, 17 Jun 2009 15:41:17 +0000 (15:41 +0000)]
Use env properly in test/Driver/analyze.c

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

16 years agoUpdate clang for the add ->add/fadd split. Likewise for sub and mul.
Chris Lattner [Wed, 17 Jun 2009 06:36:24 +0000 (06:36 +0000)]
Update clang for the add ->add/fadd split.  Likewise for sub and mul.

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

16 years agoRemove all non-const getters from TemplateArgumentList.
Anders Carlsson [Wed, 17 Jun 2009 00:35:01 +0000 (00:35 +0000)]
Remove all non-const getters from TemplateArgumentList.

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

16 years agoPlace -Wreadonly-setter-attrs under -Wmost option group.
Fariborz Jahanian [Wed, 17 Jun 2009 00:06:21 +0000 (00:06 +0000)]
Place -Wreadonly-setter-attrs under -Wmost option group.

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

16 years agoIf any tests fail, the test runner returns a status code of 1
Douglas Gregor [Tue, 16 Jun 2009 23:40:23 +0000 (23:40 +0000)]
If any tests fail, the test runner returns a status code of 1

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

16 years agoMake these driver tests do the right thing even when MACOSX_DEPLOYMENT_TARGET is...
Douglas Gregor [Tue, 16 Jun 2009 23:37:56 +0000 (23:37 +0000)]
Make these driver tests do the right thing even when MACOSX_DEPLOYMENT_TARGET is set.

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

16 years agoStub out printing of the thread model with -v.
Daniel Dunbar [Tue, 16 Jun 2009 23:32:58 +0000 (23:32 +0000)]
Stub out printing of the thread model with -v.
 - Turns out libstdcxx greps for this in configure.

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

16 years agoFake support for -print-multi-*
Daniel Dunbar [Tue, 16 Jun 2009 23:25:22 +0000 (23:25 +0000)]
Fake support for -print-multi-*
 - I think we will eventually need to support this for realz, and some build
   processes seem to depend on these options.

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

16 years agoSince integral template arguments can't have dependent types we don't need an extra...
Anders Carlsson [Tue, 16 Jun 2009 23:08:29 +0000 (23:08 +0000)]
Since integral template arguments can't have dependent types we don't need an extra pass to set the right APSInt bit width/signedness.

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

16 years agoAdd utility method GRStateRef::makeWithStore().
Ted Kremenek [Tue, 16 Jun 2009 22:55:21 +0000 (22:55 +0000)]
Add utility method GRStateRef::makeWithStore().

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

16 years agoMake DeduceNonTypeTemplateArgument take an APSInt instead of an APInt.
Anders Carlsson [Tue, 16 Jun 2009 22:44:31 +0000 (22:44 +0000)]
Make DeduceNonTypeTemplateArgument take an APSInt instead of an APInt.

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

16 years agoRegionStoreManager:
Ted Kremenek [Tue, 16 Jun 2009 22:36:44 +0000 (22:36 +0000)]
RegionStoreManager:
- Add "sections" to RegionStoreManager.cpp to delineate functionality.
- Add new function "CreateFieldsOnlyRegionStoreManager" that uses the new
  RegionStoreFeatures class to use a reduced set of features from
  RegionStoreManager (in this case, only field-sensitivity). This isn't
  completely hooked up yet.

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

16 years agoMake the clang executable target depend on clang-cc
Douglas Gregor [Tue, 16 Jun 2009 22:26:26 +0000 (22:26 +0000)]
Make the clang executable target depend on clang-cc

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

16 years agoDon't warn about -Winvalid-pch or -Wno-invalid-pch. Since we don't
Douglas Gregor [Tue, 16 Jun 2009 22:06:52 +0000 (22:06 +0000)]
Don't warn about -Winvalid-pch or -Wno-invalid-pch. Since we don't
search for PCH files that correspond to header inclusions, this option
does not make sense. Fixes <rdar://problem/6970322>.

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

16 years agoFix typo in prev commit.
Daniel Dunbar [Tue, 16 Jun 2009 21:46:01 +0000 (21:46 +0000)]
Fix typo in prev commit.

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

16 years agoDarwin/Driver: Also look at -arch command line options when finding the default
Daniel Dunbar [Tue, 16 Jun 2009 21:39:33 +0000 (21:39 +0000)]
Darwin/Driver: Also look at -arch command line options when finding the default
tool chain.

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

16 years agoAdd IOKit test cases for retain/release checker.
Ted Kremenek [Tue, 16 Jun 2009 20:44:39 +0000 (20:44 +0000)]
Add IOKit test cases for retain/release checker.

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

16 years agoUpdate Clang to include the InitializeAllTargets and
Douglas Gregor [Tue, 16 Jun 2009 20:13:51 +0000 (20:13 +0000)]
Update Clang to include the InitializeAllTargets and
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes
for the CMake-based build with Xcode.

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

16 years agosimplify .td file
Chris Lattner [Tue, 16 Jun 2009 20:04:21 +0000 (20:04 +0000)]
simplify .td file

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

16 years agoAdd -Wundeclared-selector to -Wmost options group.
Fariborz Jahanian [Tue, 16 Jun 2009 18:20:59 +0000 (18:20 +0000)]
Add -Wundeclared-selector  to -Wmost options group.

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

16 years agoIt is possible that main input file does not have any symbol with debug info. To...
Devang Patel [Tue, 16 Jun 2009 18:02:02 +0000 (18:02 +0000)]
It is possible that main input file does not have any symbol with debug info. To  handle this edge case, always create main compile unit first.
This fixes PR 4228.

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

16 years agoTest case was left behind from my last patch.
Fariborz Jahanian [Tue, 16 Jun 2009 17:57:28 +0000 (17:57 +0000)]
Test case was left behind from my last patch.

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

16 years agoUpdate checker build.
Ted Kremenek [Tue, 16 Jun 2009 17:45:57 +0000 (17:45 +0000)]
Update checker build.

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

16 years agotestcase for r72869, it turns out that it happens in Ruby.
Chris Lattner [Tue, 16 Jun 2009 17:39:02 +0000 (17:39 +0000)]
testcase for r72869, it turns out that it happens in Ruby.

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

16 years agofollow-on to my patch: some targets (like sparc) do not
Chris Lattner [Tue, 16 Jun 2009 17:27:50 +0000 (17:27 +0000)]
follow-on to my patch: some targets (like sparc) do not
have target-specific builtins, and do not set the count.
Just default to 0 for these targets.

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

16 years agoImplements -Wundeclared-selector for ObjC.
Fariborz Jahanian [Tue, 16 Jun 2009 16:25:00 +0000 (16:25 +0000)]
Implements -Wundeclared-selector for ObjC.

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

16 years agoremove extraneous diff.
Chris Lattner [Tue, 16 Jun 2009 16:22:49 +0000 (16:22 +0000)]
remove extraneous diff.

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

16 years agomy refactoring of builtins changed target-specific builtins to only be
Chris Lattner [Tue, 16 Jun 2009 16:18:48 +0000 (16:18 +0000)]
my refactoring of builtins changed target-specific builtins to only be
registered when PCH wasn't being used.  We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos.  This fixes the build of apps that use PCH and target specific
builtins together.

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

16 years agoUse canonical type for building ElementRegion. Otherwise ElementRegions cannot
Zhongxing Xu [Tue, 16 Jun 2009 09:55:50 +0000 (09:55 +0000)]
Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.

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

16 years agoDo not invalidate unboundable regions in GRSimpleVals::EvalCall().
Zhongxing Xu [Tue, 16 Jun 2009 06:18:21 +0000 (06:18 +0000)]
Do not invalidate unboundable regions in GRSimpleVals::EvalCall().

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

16 years agoHandle temporaries in default arguments.
Anders Carlsson [Tue, 16 Jun 2009 03:37:31 +0000 (03:37 +0000)]
Handle temporaries in default arguments.

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

16 years agoKeep track of whether a type parameter type is a parameter pack.
Anders Carlsson [Tue, 16 Jun 2009 00:30:48 +0000 (00:30 +0000)]
Keep track of whether a type parameter type is a parameter pack.

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

16 years agoAdd a comment to Sema::ActOnTranslationUnitScope().
Steve Naroff [Tue, 16 Jun 2009 00:20:10 +0000 (00:20 +0000)]
Add a comment to Sema::ActOnTranslationUnitScope().

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

16 years agoaccept and ignore -Wdiv-by-zero
Chris Lattner [Mon, 15 Jun 2009 23:45:43 +0000 (23:45 +0000)]
accept and ignore -Wdiv-by-zero

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

16 years agoFix: <rdar://problem/6945561> -[CIContext createCGLayerWithSize:info:] misinterpreted...
Ted Kremenek [Mon, 15 Jun 2009 20:58:58 +0000 (20:58 +0000)]
Fix: <rdar://problem/6945561> -[CIContext createCGLayerWithSize:info:] misinterpreted by clang scan-build

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

16 years agoFix: <rdar://problem/6961230> add knowledge of IOKit functions to retain/release...
Ted Kremenek [Mon, 15 Jun 2009 20:36:07 +0000 (20:36 +0000)]
Fix: <rdar://problem/6961230> add knowledge of IOKit functions to retain/release checker

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

16 years agoTweak the C++ open projects page
Douglas Gregor [Mon, 15 Jun 2009 19:53:21 +0000 (19:53 +0000)]
Tweak the C++ open projects page

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

16 years agoPR4395: Don't detect token concatenation in C mode for
Eli Friedman [Mon, 15 Jun 2009 19:48:50 +0000 (19:48 +0000)]
PR4395: Don't detect token concatenation in C mode for
C++-specific tokens.

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

16 years agoInclude <limits>
Anders Carlsson [Mon, 15 Jun 2009 19:08:31 +0000 (19:08 +0000)]
Include <limits>

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

16 years agoMore XML output support, from Olaf Krzikalla!
Douglas Gregor [Mon, 15 Jun 2009 19:02:54 +0000 (19:02 +0000)]
More XML output support, from Olaf Krzikalla!

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

16 years agoMore parameter pack work.
Anders Carlsson [Mon, 15 Jun 2009 17:56:45 +0000 (17:56 +0000)]
More parameter pack work.

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

16 years agoRevert r73341.
Ted Kremenek [Mon, 15 Jun 2009 17:23:35 +0000 (17:23 +0000)]
Revert r73341.

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

16 years agoMore [basic.lookup.unqual] tests.
Daniel Dunbar [Mon, 15 Jun 2009 17:18:42 +0000 (17:18 +0000)]
More [basic.lookup.unqual] tests.
 - p13 and p14 are important failures.

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

16 years agoAdd a new 'Pack' argument kind to TemplateArgument. This is not yet used.
Anders Carlsson [Mon, 15 Jun 2009 17:04:53 +0000 (17:04 +0000)]
Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.

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

16 years agoBase SFINAE error suppression counting on the class of an error, not
Douglas Gregor [Mon, 15 Jun 2009 16:52:15 +0000 (16:52 +0000)]
Base SFINAE error suppression counting on the class of an error, not
its (possibly-remapped) diagnostics. Thanks, Chris!

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

16 years agoNote that we've implemented the right angle brackets extension in C++0x
Douglas Gregor [Mon, 15 Jun 2009 16:50:45 +0000 (16:50 +0000)]
Note that we've implemented the right angle brackets extension in C++0x

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

16 years agoTest for [basic.lookup.unqual]p3
Daniel Dunbar [Mon, 15 Jun 2009 15:56:08 +0000 (15:56 +0000)]
Test for [basic.lookup.unqual]p3
 - Failing, at least in part, because lookup in parser is finding a friend
   function where it shouldn't.

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

16 years ago'not magic' => 'is not magic'
Zhongxing Xu [Mon, 15 Jun 2009 13:22:32 +0000 (13:22 +0000)]
'not magic' => 'is not magic'

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

16 years agoPR4388: get rid of an extra # line directive; in addition to being
Eli Friedman [Mon, 15 Jun 2009 09:57:52 +0000 (09:57 +0000)]
PR4388: get rid of an extra # line directive; in addition to being
unnecessary, this was causing issues for assembler-with-cpp mode, which
doesn't process the directive.

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

16 years agoMinor tweak to -fdiagnostics-print-source-range-info to make it print
Chris Lattner [Mon, 15 Jun 2009 05:18:27 +0000 (05:18 +0000)]
Minor tweak to -fdiagnostics-print-source-range-info to make it print
ranges more similar to the console output.  Consider:

#define FOO(X, Y) X/ Y

void foo(int *P, int *Q) {
  FOO(P, Q);
}

Before we emitted:

t.c:4:3:{4:3-4:6}{4:3-4:6}: error: invalid operands to binary expression ('int *' and 'int *')
   FOO(P, Q);
   ^~~~~~~~~
...

Note that while we underline the macro args that the range info just includes FOO
without its macros.  This change teaches the printed ranges to include macro args
also so that we get:

t.c:4:3:{4:3-4:12}{4:3-4:12}: error: invalid operands to binary expression ('int *' and 'int *')
   FOO(P, Q);
   ^~~~~~~~~
...

This fixes rdar://6939599

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

16 years agoFix #pragma GCC system_header by making it insert a virtual linemarker into
Chris Lattner [Mon, 15 Jun 2009 05:02:34 +0000 (05:02 +0000)]
Fix #pragma GCC system_header by making it insert a virtual linemarker into
the file at the point of the pragma.  This allows clang to know that all
sourcelocations after the pragma are in a system header.

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

16 years agorename test
Chris Lattner [Mon, 15 Jun 2009 05:00:02 +0000 (05:00 +0000)]
rename test

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

16 years agoconvert this test to -verify mode.
Chris Lattner [Mon, 15 Jun 2009 04:59:21 +0000 (04:59 +0000)]
convert this test to -verify mode.

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

16 years agoIf PCH refers to a file that doesn't exist anymore, emit a nice error
Chris Lattner [Mon, 15 Jun 2009 04:35:16 +0000 (04:35 +0000)]
If PCH refers to a file that doesn't exist anymore, emit a nice error
like:
fatal error: could not find file '1.h' referenced by PCH file
instead of aborting with an assertion failure, PR4219

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

16 years agouse the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!
Chris Lattner [Mon, 15 Jun 2009 04:25:18 +0000 (04:25 +0000)]
use the new Path::isAbsolute function, fixing a fixme.  Patch by Gregory Curfman!

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

16 years agono really, add the lines :)
Chris Lattner [Mon, 15 Jun 2009 04:08:28 +0000 (04:08 +0000)]
no really, add the lines :)

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

16 years agoFix PR2741 by making our newline tracking be aware of newlines that
Chris Lattner [Mon, 15 Jun 2009 01:25:23 +0000 (01:25 +0000)]
Fix PR2741 by making our newline tracking be aware of newlines that
can occur in the middle of comment tokens.

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

16 years ago"GCC emits an __objc_class_name_{classname} symbol for every class, and a correspondi...
Chris Lattner [Mon, 15 Jun 2009 01:09:11 +0000 (01:09 +0000)]
"GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class.  This causes linker errors when you try linking a program which references some classes but doesn't define them.  The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."

Patch by David Chisnall!

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

16 years agoPR4391: Tweak -ast-print output to generate valid output for edge cases
Eli Friedman [Sun, 14 Jun 2009 22:39:26 +0000 (22:39 +0000)]
PR4391: Tweak -ast-print output to generate valid output for edge cases
like "int x = + +3;".

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

16 years agoPR4390: Make sure to handle anonymous unions correctly while building
Eli Friedman [Sun, 14 Jun 2009 21:41:37 +0000 (21:41 +0000)]
PR4390: Make sure to handle anonymous unions correctly while building
static intializers for structs.

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

16 years agoTest modification.
Fariborz Jahanian [Sun, 14 Jun 2009 16:45:35 +0000 (16:45 +0000)]
Test modification.
Patch by Jean-Daniel Dupas

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

16 years agofix the menu's links
Nuno Lopes [Sun, 14 Jun 2009 09:40:09 +0000 (09:40 +0000)]
fix the menu's links

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

16 years agoIntroduce a SFINAE "trap" that keeps track of the number of errors
Douglas Gregor [Sun, 14 Jun 2009 08:02:22 +0000 (08:02 +0000)]
Introduce a SFINAE "trap" that keeps track of the number of errors
that were suppressed due to SFINAE. By checking whether any errors
occur at the end of template argument deduction, we avoid the
possibility of suppressing an error (due to SFINAE) and then
recovering so well that template argument deduction never detects that
there was a problem. Thanks to Eli for the push in this direction.

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

16 years agoUpdate LLVM.
Douglas Gregor [Sun, 14 Jun 2009 07:33:30 +0000 (07:33 +0000)]
Update LLVM.

Implement support for C++ Substitution Failure Is Not An Error
(SFINAE), which says that errors that occur during template argument
deduction do *not* produce diagnostics and do not necessarily make a
program ill-formed. Instead, template argument deduction silently
fails. This is currently implemented for template argument deduction
during matching of class template partial specializations, although
the mechanism will also apply to template argument deduction for
function templates. The scheme is simple:

  - If we are in a template argument deduction context, any diagnostic
    that is considered a SFINAE error (or warning) will be
    suppressed. The error will be propagated up the call stack via the
    normal means.
  - By default, all warnings and errors are SFINAE errors. Add the
    NoSFINAE class to a diagnostic in the .td file to make it a hard
    error (e.g., for access-control violations).

Note that, to make this fully work, every place in Sema that emits an
error *and then immediately recovers* will need to check
Sema::isSFINAEContext() to determine whether it must immediately
return an error rather than recovering.

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

16 years agoFix "for all intensive purposes" to "for all intents and purposes".
Nick Lewycky [Sun, 14 Jun 2009 04:08:08 +0000 (04:08 +0000)]
Fix "for all intensive purposes" to "for all intents and purposes".

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

16 years agoPR4351: Add constant evaluation for constructs like "foo == NULL", where
Eli Friedman [Sun, 14 Jun 2009 02:17:33 +0000 (02:17 +0000)]
PR4351: Add constant evaluation for constructs like "foo == NULL", where
foo has a constant address.

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

16 years agoSink the BuiltinInfo object from ASTContext into the
Chris Lattner [Sun, 14 Jun 2009 01:54:56 +0000 (01:54 +0000)]
Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc.  This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.

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

16 years agomove the various builtins stuff from libast to libbasic. This
Chris Lattner [Sun, 14 Jun 2009 01:05:48 +0000 (01:05 +0000)]
move the various builtins stuff from libast to libbasic.  This
fixes a layering violation in lib/Basic/Targets.cpp.

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

16 years agoprune #includes, Builtins.h/cpp no longer depends on libast.
Chris Lattner [Sun, 14 Jun 2009 00:52:07 +0000 (00:52 +0000)]
prune #includes, Builtins.h/cpp no longer depends on libast.

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