Commit Graph

4665 Commits

Author SHA1 Message Date
Fariborz Jahanian 3fd7310d70 Use QualType to represent block's implicit return type as
to not lose its 'const/volatile' qualifier.

llvm-svn: 73795
2009-06-19 23:37:08 +00:00
Fariborz Jahanian 423a81f259 Patch for implementation of C++'s object model. This is
work in progress.

llvm-svn: 73782
2009-06-19 19:55:27 +00:00
Ted Kremenek c55f0cdaa0 Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, instead
preferring to use their replacements in GRState. This further unifies the code
paths for such logic and leads to some code reduction.

llvm-svn: 73771
2009-06-19 17:10:32 +00:00
Zhongxing Xu 54fb536b5c A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the
sign to be consistent.

llvm-svn: 73756
2009-06-19 06:00:32 +00:00
Argyrios Kyrtzidis 366985d5eb Make changes to PCHReader to allow reading a PCH file without having a pre-initialized Preprocessor.
-Introduce 'PCHReaderListener' which is an abstract interface for getting various information from the PCHReader.
-If PCHReader is constructed without a Preprocessor, it can still load the file and invoke the callbacks of PCHReaderListener.
-If PCHReader is constructed with an initialized Preprocessor, PCHValidator is used as a PCHReaderListener to validate the contents of the PCH file against the given Preprocessor.

llvm-svn: 73741
2009-06-19 00:03:23 +00:00
Ted Kremenek 095f1a9848 Move clients over from using GRStateManager::BindXXX and friends to
GRState->bindXXX and friends (and constify some arguments along the way).

llvm-svn: 73740
2009-06-18 23:58:37 +00:00
Ted Kremenek f9906843b7 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.

llvm-svn: 73731
2009-06-18 22:57:13 +00:00
Douglas Gregor 1e09bf83c0 Some cleanups suggested by Chris
llvm-svn: 73713
2009-06-18 18:45:36 +00:00
Douglas Gregor 78bd61f661 Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
llvm-svn: 73702
2009-06-18 16:11:24 +00:00
Zhongxing Xu cea6578078 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.

llvm-svn: 73690
2009-06-18 06:29:10 +00:00
Zhongxing Xu dd19e15fe2 More GRStateRef removal fix.
llvm-svn: 73674
2009-06-18 03:42:19 +00:00
Ted Kremenek 6a667ab710 Remove GRStateRef.
llvm-svn: 73670
2009-06-18 01:33:24 +00:00
Ted Kremenek d93c6e3fd6 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).

llvm-svn: 73669
2009-06-18 01:23:53 +00:00
Ted Kremenek 89a303caac Remove another dependency on GRStateRef.
llvm-svn: 73667
2009-06-18 00:49:02 +00:00
Argyrios Kyrtzidis 3df1978270 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.

llvm-svn: 73652
2009-06-17 22:50:06 +00:00
Argyrios Kyrtzidis c4b766bc65 Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.
llvm-svn: 73651
2009-06-17 22:49:50 +00:00
Steve Naroff fb4330f255 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.

llvm-svn: 73649
2009-06-17 22:40:22 +00:00
Ted Kremenek b35e2caab5 Remove more uses of GRStateRef.
llvm-svn: 73648
2009-06-17 22:28:13 +00:00
Ted Kremenek d0d4cfc8e7 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.

llvm-svn: 73645
2009-06-17 22:06:03 +00:00
Ted Kremenek 609df30929 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.

llvm-svn: 73644
2009-06-17 22:02:04 +00:00
Douglas Gregor 758a869b14 Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!

llvm-svn: 73641
2009-06-17 21:51:59 +00:00
Fariborz Jahanian ccd44a5072 Added missing @endcode.
llvm-svn: 73629
2009-06-17 20:24:52 +00:00
Douglas Gregor 6b6bba4a20 Diagnose the use of attributes on namespace aliases, from Anis Ahmad
llvm-svn: 73626
2009-06-17 19:49:00 +00:00
Anders Carlsson 58a9b0eafe Remove all non-const getters from TemplateArgumentList.
llvm-svn: 73589
2009-06-17 00:35:01 +00:00
Fariborz Jahanian 5b130a56fd Place -Wreadonly-setter-attrs under -Wmost option group.
llvm-svn: 73585
2009-06-17 00:06:21 +00:00
Daniel Dunbar 1b3ec3a000 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.

llvm-svn: 73581
2009-06-16 23:25:22 +00:00
Ted Kremenek b538e7b64f Add utility method GRStateRef::makeWithStore().
llvm-svn: 73576
2009-06-16 22:55:21 +00:00
Ted Kremenek 4533a55696 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.

llvm-svn: 73572
2009-06-16 22:36:44 +00:00
Douglas Gregor 71544dba9d 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>.

llvm-svn: 73563
2009-06-16 22:06:52 +00:00
Chris Lattner 392da9c56d simplify .td file
llvm-svn: 73542
2009-06-16 20:04:21 +00:00
Fariborz Jahanian 4be3f263c7 Add -Wundeclared-selector to -Wmost options group.
llvm-svn: 73524
2009-06-16 18:20:59 +00:00
Fariborz Jahanian 0571d9bbba Implements -Wundeclared-selector for ObjC.
llvm-svn: 73495
2009-06-16 16:25:00 +00:00
Chris Lattner 4ef49c1d6e 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.

llvm-svn: 73492
2009-06-16 16:18:48 +00:00
Zhongxing Xu 838a0db0ba Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.

llvm-svn: 73482
2009-06-16 09:55:50 +00:00
Anders Carlsson a42ab8f3d5 Handle temporaries in default arguments.
llvm-svn: 73462
2009-06-16 03:37:31 +00:00
Anders Carlsson 90036dc96a Keep track of whether a type parameter type is a parameter pack.
llvm-svn: 73452
2009-06-16 00:30:48 +00:00
Chris Lattner 49ffbb73ce accept and ignore -Wdiv-by-zero
llvm-svn: 73446
2009-06-15 23:45:43 +00:00
Anders Carlsson ebf5be8db9 Include <limits>
llvm-svn: 73403
2009-06-15 19:08:31 +00:00
Douglas Gregor f39bf33dc0 More XML output support, from Olaf Krzikalla!
llvm-svn: 73402
2009-06-15 19:02:54 +00:00
Anders Carlsson 475501b01c More parameter pack work.
llvm-svn: 73395
2009-06-15 17:56:45 +00:00
Anders Carlsson bc34391f04 Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.
llvm-svn: 73391
2009-06-15 17:04:53 +00:00
Douglas Gregor 33834516f3 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.

llvm-svn: 73332
2009-06-14 07:33:30 +00:00
Chris Lattner 15ba94987a 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.

llvm-svn: 73319
2009-06-14 01:54:56 +00:00
Chris Lattner 5abdec7978 move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.

llvm-svn: 73318
2009-06-14 01:05:48 +00:00
Chris Lattner 3d4ead17c7 prune #includes, Builtins.h/cpp no longer depends on libast.
llvm-svn: 73317
2009-06-14 00:52:07 +00:00
Chris Lattner ecd79c6353 move GetBuiltinType from Builtin::Context to ASTContext.
llvm-svn: 73316
2009-06-14 00:45:47 +00:00
Chris Lattner 34a9566c8c improve localizability by not passing english phrases into
diagnostics in some cases.

llvm-svn: 73314
2009-06-14 00:07:48 +00:00
Chris Lattner a744527773 add a handy predicate.
llvm-svn: 73310
2009-06-13 23:31:51 +00:00
Chris Lattner b3c4fb5cac declare an 'operator delete' to match operator new, this avoids many many
warnings when building with VC++, patch by AlisdairM!

llvm-svn: 73305
2009-06-13 20:51:38 +00:00
Anders Carlsson 40c1d49615 Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change.
llvm-svn: 73297
2009-06-13 18:20:51 +00:00