Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2010 17:45:59 +0000 (UTC)
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r204962 - in vendor/clang/dist: bindings/python/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Checker/PathSensitive include/clang/Frontend include/clang/Lex ...
Message-ID:  <201003101745.o2AHjxmK011270@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rdivacky
Date: Wed Mar 10 17:45:58 2010
New Revision: 204962
URL: http://svn.freebsd.org/changeset/base/204962

Log:
  Update clang to r98164.

Added:
  vendor/clang/dist/lib/AST/RecordLayout.cpp
  vendor/clang/dist/test/CodeGen/2010-03-09-DbgInfo.c
  vendor/clang/dist/test/CodeGenCXX/2010-03-09-AnonAggregate.cpp
  vendor/clang/dist/test/CodeGenCXX/PR6474.cpp
  vendor/clang/dist/test/CodeGenCXX/default-destructor-nested.cpp
  vendor/clang/dist/test/Driver/clang-g-opts.c
  vendor/clang/dist/test/Headers/
  vendor/clang/dist/test/Headers/typedef_guards.c
  vendor/clang/dist/test/Index/annotate-tokens.m
  vendor/clang/dist/test/Sema/warn-missing-braces.c
Modified:
  vendor/clang/dist/bindings/python/clang/cindex.py
  vendor/clang/dist/include/clang-c/Index.h
  vendor/clang/dist/include/clang/AST/ASTContext.h
  vendor/clang/dist/include/clang/AST/Decl.h
  vendor/clang/dist/include/clang/AST/DeclObjC.h
  vendor/clang/dist/include/clang/AST/DeclTemplate.h
  vendor/clang/dist/include/clang/AST/ExprObjC.h
  vendor/clang/dist/include/clang/AST/PrettyPrinter.h
  vendor/clang/dist/include/clang/AST/RecordLayout.h
  vendor/clang/dist/include/clang/AST/Type.h
  vendor/clang/dist/include/clang/AST/TypeLoc.h
  vendor/clang/dist/include/clang/AST/TypeNodes.def
  vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
  vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
  vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h
  vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
  vendor/clang/dist/include/clang/Frontend/DeclXML.def
  vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h
  vendor/clang/dist/include/clang/Lex/Preprocessor.h
  vendor/clang/dist/include/clang/Parse/DeclSpec.h
  vendor/clang/dist/lib/AST/ASTContext.cpp
  vendor/clang/dist/lib/AST/ASTDiagnostic.cpp
  vendor/clang/dist/lib/AST/ASTImporter.cpp
  vendor/clang/dist/lib/AST/CMakeLists.txt
  vendor/clang/dist/lib/AST/DeclBase.cpp
  vendor/clang/dist/lib/AST/DeclCXX.cpp
  vendor/clang/dist/lib/AST/DeclObjC.cpp
  vendor/clang/dist/lib/AST/DeclTemplate.cpp
  vendor/clang/dist/lib/AST/Expr.cpp
  vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp
  vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp
  vendor/clang/dist/lib/AST/Type.cpp
  vendor/clang/dist/lib/AST/TypePrinter.cpp
  vendor/clang/dist/lib/Analysis/AnalysisContext.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/Checker/BasicStore.cpp
  vendor/clang/dist/lib/Checker/CFRefCount.cpp
  vendor/clang/dist/lib/Checker/GRExprEngine.cpp
  vendor/clang/dist/lib/Checker/MallocChecker.cpp
  vendor/clang/dist/lib/Checker/RegionStore.cpp
  vendor/clang/dist/lib/Checker/SVals.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.h
  vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp
  vendor/clang/dist/lib/CodeGen/CGObjC.cpp
  vendor/clang/dist/lib/CodeGen/CGVtable.cpp
  vendor/clang/dist/lib/CodeGen/CGVtable.h
  vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenModule.h
  vendor/clang/dist/lib/CodeGen/Mangle.cpp
  vendor/clang/dist/lib/Driver/HostInfo.cpp
  vendor/clang/dist/lib/Driver/Tools.cpp
  vendor/clang/dist/lib/Frontend/CacheTokens.cpp
  vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
  vendor/clang/dist/lib/Frontend/DeclXML.cpp
  vendor/clang/dist/lib/Frontend/DependencyFile.cpp
  vendor/clang/dist/lib/Frontend/FrontendAction.cpp
  vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp
  vendor/clang/dist/lib/Frontend/PCHReader.cpp
  vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp
  vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp
  vendor/clang/dist/lib/Frontend/PCHWriter.cpp
  vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp
  vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp
  vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp
  vendor/clang/dist/lib/Headers/smmintrin.h
  vendor/clang/dist/lib/Headers/stdarg.h
  vendor/clang/dist/lib/Headers/stddef.h
  vendor/clang/dist/lib/Index/Analyzer.cpp
  vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp
  vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp
  vendor/clang/dist/lib/Sema/SemaCXXCast.cpp
  vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
  vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaExprCXX.cpp
  vendor/clang/dist/lib/Sema/SemaExprObjC.cpp
  vendor/clang/dist/lib/Sema/SemaInit.cpp
  vendor/clang/dist/lib/Sema/SemaTemplate.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/lib/Sema/TreeTransform.h
  vendor/clang/dist/test/Analysis/dead-stores.c
  vendor/clang/dist/test/Analysis/malloc.c
  vendor/clang/dist/test/CMakeLists.txt
  vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp
  vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp
  vendor/clang/dist/test/CXX/class/class.friend/p1.cpp
  vendor/clang/dist/test/CXX/class/class.local/p2.cpp
  vendor/clang/dist/test/CXX/class/class.union/p1.cpp
  vendor/clang/dist/test/CXX/conv/conv.mem/p4.cpp
  vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.init/p6.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp
  vendor/clang/dist/test/CodeCompletion/call.cpp
  vendor/clang/dist/test/CodeCompletion/enum-switch-case-qualified.cpp
  vendor/clang/dist/test/CodeCompletion/enum-switch-case.cpp
  vendor/clang/dist/test/CodeGen/init.c
  vendor/clang/dist/test/CodeGenCXX/internal-linkage.cpp
  vendor/clang/dist/test/CodeGenCXX/mangle-system-header.cpp
  vendor/clang/dist/test/CodeGenCXX/nullptr.cpp
  vendor/clang/dist/test/CodeGenCXX/virtual-base-destructor-call.cpp
  vendor/clang/dist/test/CodeGenCXX/vtable-layout-abi-examples.cpp
  vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp
  vendor/clang/dist/test/CodeGenObjC/id-isa-codegen.m
  vendor/clang/dist/test/FixIt/typo.cpp
  vendor/clang/dist/test/Index/c-index-getCursor-test.m
  vendor/clang/dist/test/Index/code-completion.cpp
  vendor/clang/dist/test/Parser/altivec.c
  vendor/clang/dist/test/Parser/cxx-altivec.cpp
  vendor/clang/dist/test/SemaCXX/access-base-class.cpp
  vendor/clang/dist/test/SemaCXX/access-control-check.cpp
  vendor/clang/dist/test/SemaCXX/aggregate-initialization.cpp
  vendor/clang/dist/test/SemaCXX/ambig-user-defined-conversions.cpp
  vendor/clang/dist/test/SemaCXX/arrow-operator.cpp
  vendor/clang/dist/test/SemaCXX/attr-cxx0x.cpp
  vendor/clang/dist/test/SemaCXX/builtin-ptrtomember-overload-1.cpp
  vendor/clang/dist/test/SemaCXX/cast-conversion.cpp
  vendor/clang/dist/test/SemaCXX/class-base-member-init.cpp
  vendor/clang/dist/test/SemaCXX/conditional-expr.cpp
  vendor/clang/dist/test/SemaCXX/const-cast.cpp
  vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp
  vendor/clang/dist/test/SemaCXX/conversion-delete-expr.cpp
  vendor/clang/dist/test/SemaCXX/conversion-function.cpp
  vendor/clang/dist/test/SemaCXX/convert-to-bool.cpp
  vendor/clang/dist/test/SemaCXX/copy-assignment.cpp
  vendor/clang/dist/test/SemaCXX/copy-initialization.cpp
  vendor/clang/dist/test/SemaCXX/cstyle-cast.cpp
  vendor/clang/dist/test/SemaCXX/dcl_init_aggr.cpp
  vendor/clang/dist/test/SemaCXX/decl-init-ref.cpp
  vendor/clang/dist/test/SemaCXX/decltype-overloaded-functions.cpp
  vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp
  vendor/clang/dist/test/SemaCXX/default-constructor-initializers.cpp
  vendor/clang/dist/test/SemaCXX/default2.cpp
  vendor/clang/dist/test/SemaCXX/deleted-function.cpp
  vendor/clang/dist/test/SemaCXX/derived-to-base-ambig.cpp
  vendor/clang/dist/test/SemaCXX/destructor.cpp
  vendor/clang/dist/test/SemaCXX/direct-initializer.cpp
  vendor/clang/dist/test/SemaCXX/dynamic-cast.cpp
  vendor/clang/dist/test/SemaCXX/elaborated-type-specifier.cpp
  vendor/clang/dist/test/SemaCXX/exception-spec.cpp
  vendor/clang/dist/test/SemaCXX/exceptions.cpp
  vendor/clang/dist/test/SemaCXX/functional-cast.cpp
  vendor/clang/dist/test/SemaCXX/illegal-member-initialization.cpp
  vendor/clang/dist/test/SemaCXX/implicit-virtual-member-functions.cpp
  vendor/clang/dist/test/SemaCXX/incomplete-call.cpp
  vendor/clang/dist/test/SemaCXX/inherit.cpp
  vendor/clang/dist/test/SemaCXX/member-name-lookup.cpp
  vendor/clang/dist/test/SemaCXX/member-pointer.cpp
  vendor/clang/dist/test/SemaCXX/missing-members.cpp
  vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp
  vendor/clang/dist/test/SemaCXX/new-delete.cpp
  vendor/clang/dist/test/SemaCXX/offsetof.cpp
  vendor/clang/dist/test/SemaCXX/overload-call.cpp
  vendor/clang/dist/test/SemaCXX/overload-member-call.cpp
  vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp
  vendor/clang/dist/test/SemaCXX/qual-id-test.cpp
  vendor/clang/dist/test/SemaCXX/qualified-id-lookup.cpp
  vendor/clang/dist/test/SemaCXX/qualified-names-diag.cpp
  vendor/clang/dist/test/SemaCXX/ref-init-ambiguous.cpp
  vendor/clang/dist/test/SemaCXX/references.cpp
  vendor/clang/dist/test/SemaCXX/reinterpret-cast.cpp
  vendor/clang/dist/test/SemaCXX/rval-references.cpp
  vendor/clang/dist/test/SemaCXX/statements.cpp
  vendor/clang/dist/test/SemaCXX/static-assert.cpp
  vendor/clang/dist/test/SemaCXX/static-cast-complete-type.cpp
  vendor/clang/dist/test/SemaCXX/static-cast.cpp
  vendor/clang/dist/test/SemaCXX/type-traits-incomplete.cpp
  vendor/clang/dist/test/SemaCXX/typedef-redecl.cpp
  vendor/clang/dist/test/SemaCXX/typeid.cpp
  vendor/clang/dist/test/SemaCXX/unknown-type-name.cpp
  vendor/clang/dist/test/SemaCXX/using-decl-templates.cpp
  vendor/clang/dist/test/SemaCXX/value-initialization.cpp
  vendor/clang/dist/test/SemaCXX/vararg-non-pod.cpp
  vendor/clang/dist/test/SemaCXX/vector-casts.cpp
  vendor/clang/dist/test/SemaCXX/virtual-member-functions-key-function.cpp
  vendor/clang/dist/test/SemaCXX/virtual-override.cpp
  vendor/clang/dist/test/SemaCXX/warn-reorder-ctor-initialization.cpp
  vendor/clang/dist/test/SemaObjC/blocks.m
  vendor/clang/dist/test/SemaObjC/exprs.m
  vendor/clang/dist/test/SemaObjCXX/cstyle-cast.mm
  vendor/clang/dist/test/SemaObjCXX/vararg-non-pod.mm
  vendor/clang/dist/test/SemaTemplate/class-template-id-2.cpp
  vendor/clang/dist/test/SemaTemplate/class-template-spec.cpp
  vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp
  vendor/clang/dist/test/SemaTemplate/dependent-base-classes.cpp
  vendor/clang/dist/test/SemaTemplate/ext-vector-type.cpp
  vendor/clang/dist/test/SemaTemplate/injected-class-name.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-cast.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-complete.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-exception-spec.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-expr-1.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-field.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-member-expr.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-method.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-static-var.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-typedef.cpp
  vendor/clang/dist/test/SemaTemplate/instantiation-backtrace.cpp
  vendor/clang/dist/test/SemaTemplate/metafun-apply.cpp
  vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp
  vendor/clang/dist/test/SemaTemplate/temp_arg_type.cpp
  vendor/clang/dist/test/SemaTemplate/typename-specifier-4.cpp
  vendor/clang/dist/test/SemaTemplate/typename-specifier.cpp
  vendor/clang/dist/test/SemaTemplate/virtual-member-functions.cpp
  vendor/clang/dist/test/lit.cfg
  vendor/clang/dist/tools/CIndex/CIndex.cpp
  vendor/clang/dist/tools/CIndex/CIndex.exports
  vendor/clang/dist/tools/Makefile
  vendor/clang/dist/tools/driver/driver.cpp
  vendor/clang/dist/tools/scan-build/ccc-analyzer

Modified: vendor/clang/dist/bindings/python/clang/cindex.py
==============================================================================
--- vendor/clang/dist/bindings/python/clang/cindex.py	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/bindings/python/clang/cindex.py	Wed Mar 10 17:45:58 2010	(r204962)
@@ -187,12 +187,56 @@ class Diagnostic(object):
     Error   = 3
     Fatal   = 4
 
-    def __init__(self, severity, location, spelling, ranges, fixits):
-        self.severity = severity
-        self.location = location
-        self.spelling = spelling
-        self.ranges = ranges
-        self.fixits = fixits
+    def __init__(self, ptr):
+        self.ptr = ptr
+
+    def __del__(self):
+        _clang_disposeDiagnostic(self.ptr)
+
+    @property
+    def severity(self):
+        return _clang_getDiagnosticSeverity(self.ptr)
+
+    @property
+    def location(self):
+        return _clang_getDiagnosticLocation(self.ptr)
+
+    @property
+    def spelling(self):
+        return _clang_getDiagnosticSpelling(self.ptr)
+
+    @property
+    def ranges(self):
+        class RangeIterator:
+            def __init__(self, diag):
+                self.diag = diag
+
+            def __len__(self):
+                return int(_clang_getDiagnosticNumRanges(self.diag))
+
+            def __getitem__(self, key):
+                return _clang_getDiagnosticRange(self.diag, key)
+
+        return RangeIterator(self.ptr)
+
+    @property
+    def fixits(self):
+        class FixItIterator:
+            def __init__(self, diag):
+                self.diag = diag
+
+            def __len__(self):
+                return int(_clang_getDiagnosticNumFixIts(self.diag))
+
+            def __getitem__(self, key):
+                range = SourceRange()
+                value = _clang_getDiagnosticFixIt(self.diag, key, byref(range))
+                if len(value) == 0:
+                    raise IndexError
+
+                return FixIt(range, value)
+
+        return FixItIterator(self.ptr)
 
     def __repr__(self):
         return "<Diagnostic severity %r, location %r, spelling %r>" % (
@@ -539,8 +583,16 @@ class _CXUnsavedFile(Structure):
 
 ## Diagnostic Conversion ##
 
-# Diagnostic objects are temporary, we must extract all the information from the
-# diagnostic object when it is passed to the callback.
+_clang_getNumDiagnostics = lib.clang_getNumDiagnostics
+_clang_getNumDiagnostics.argtypes = [c_object_p]
+_clang_getNumDiagnostics.restype = c_uint
+
+_clang_getDiagnostic = lib.clang_getDiagnostic
+_clang_getDiagnostic.argtypes = [c_object_p, c_uint]
+_clang_getDiagnostic.restype = c_object_p
+
+_clang_disposeDiagnostic = lib.clang_disposeDiagnostic
+_clang_disposeDiagnostic.argtypes = [c_object_p]
 
 _clang_getDiagnosticSeverity = lib.clang_getDiagnosticSeverity
 _clang_getDiagnosticSeverity.argtypes = [c_object_p]
@@ -567,67 +619,10 @@ _clang_getDiagnosticNumFixIts = lib.clan
 _clang_getDiagnosticNumFixIts.argtypes = [c_object_p]
 _clang_getDiagnosticNumFixIts.restype = c_uint
 
-_clang_getDiagnosticFixItKind = lib.clang_getDiagnosticFixItKind
-_clang_getDiagnosticFixItKind.argtypes = [c_object_p, c_uint]
-_clang_getDiagnosticFixItKind.restype = c_int
-
-_clang_getDiagnosticFixItInsertion = lib.clang_getDiagnosticFixItInsertion
-_clang_getDiagnosticFixItInsertion.argtypes = [c_object_p, c_uint,
-                                               POINTER(SourceLocation)]
-_clang_getDiagnosticFixItInsertion.restype = _CXString
-_clang_getDiagnosticFixItInsertion.errcheck = _CXString.from_result
-
-_clang_getDiagnosticFixItRemoval = lib.clang_getDiagnosticFixItRemoval
-_clang_getDiagnosticFixItRemoval.argtypes = [c_object_p, c_uint,
-                                             POINTER(SourceLocation)]
-_clang_getDiagnosticFixItRemoval.restype = _CXString
-_clang_getDiagnosticFixItRemoval.errcheck = _CXString.from_result
-
-_clang_getDiagnosticFixItReplacement = lib.clang_getDiagnosticFixItReplacement
-_clang_getDiagnosticFixItReplacement.argtypes = [c_object_p, c_uint,
-                                                 POINTER(SourceRange)]
-_clang_getDiagnosticFixItReplacement.restype = _CXString
-_clang_getDiagnosticFixItReplacement.errcheck = _CXString.from_result
-
-def _convert_fixit(diag_ptr, index):
-    # We normalize all the fix-its to a single representation, this is more
-    # convenient.
-    #
-    # FIXME: Push this back into API? It isn't exactly clear what the
-    # SourceRange semantics are, we should make sure we can represent an empty
-    # range.
-    kind = _clang_getDiagnosticFixItKind(diag_ptr, index)
-    range = None
-    value = None
-    if kind == 0: # insertion
-        location = SourceLocation()
-        value = _clang_getDiagnosticFixItInsertion(diag_ptr, index,
-                                                   byref(location))
-        range = SourceRange.from_locations(location, location)
-    elif kind == 1: # removal
-        range = _clang_getDiagnosticFixItRemoval(diag_ptr, index)
-        value = ''
-    else: # replacement
-        assert kind == 2
-        range = SourceRange()
-        value = _clang_getDiagnosticFixItReplacement(diag_ptr, index,
-                                                     byref(range))
-    return FixIt(range, value)
-
-def _convert_diag(diag_ptr, diag_list):
-    severity = _clang_getDiagnosticSeverity(diag_ptr)
-    loc = _clang_getDiagnosticLocation(diag_ptr)
-    spelling = _clang_getDiagnosticSpelling(diag_ptr)
-
-    # Diagnostic ranges.
-    num_ranges = _clang_getDiagnosticNumRanges(diag_ptr)
-    ranges = [_clang_getDiagnosticRange(diag_ptr, i)
-              for i in range(num_ranges)]
-
-    fixits = [_convert_fixit(diag_ptr, i)
-              for i in range(_clang_getDiagnosticNumFixIts(diag_ptr))]
-
-    diag_list.append(Diagnostic(severity, loc, spelling, ranges, fixits))
+_clang_getDiagnosticFixIt = lib.clang_getDiagnosticFixIt
+_clang_getDiagnosticFixIt.argtypes = [c_object_p, c_uint, POINTER(SourceRange)]
+_clang_getDiagnosticFixIt.restype = _CXString
+_clang_getDiagnosticFixIt.errcheck = _CXString.from_result
 
 ###
 
@@ -645,18 +640,14 @@ class Index(ClangObject):
         Parameters:
         excludeDecls -- Exclude local declarations from translation units.
         """
-        return Index(Index_create(excludeDecls))
+        return Index(Index_create(excludeDecls, 0))
 
     def __del__(self):
         Index_dispose(self)
 
     def read(self, path):
         """Load the translation unit from the given AST file."""
-        # FIXME: In theory, we could support streaming diagnostics. It's hard to
-        # integrate this into the API cleanly, however. Resolve.
-        diags = []
-        ptr = TranslationUnit_read(self, path,
-                                   Diagnostic_callback(_convert_diag), diags)
+        ptr = TranslationUnit_read(self, path)
         return TranslationUnit(ptr) if ptr else None
 
     def parse(self, path, args = [], unsaved_files = []):
@@ -687,13 +678,9 @@ class Index(ClangObject):
                 unsaved_files_array[i].name = name
                 unsaved_files_array[i].contents = value
                 unsaved_files_array[i].length = len(value)
-        # FIXME: In theory, we could support streaming diagnostics. It's hard to
-        # integrate this into the API cleanly, however. Resolve.
-        diags = []
         ptr = TranslationUnit_parse(self, path, len(args), arg_array,
-                                    len(unsaved_files), unsaved_files_array,
-                                    Diagnostic_callback(_convert_diag), diags)
-        return TranslationUnit(ptr, diags) if ptr else None
+                                    len(unsaved_files), unsaved_files_array)
+        return TranslationUnit(ptr) if ptr else None
 
 
 class TranslationUnit(ClangObject):
@@ -702,9 +689,8 @@ class TranslationUnit(ClangObject):
     provides read-only access to its top-level declarations.
     """
 
-    def __init__(self, ptr, diagnostics):
+    def __init__(self, ptr):
         ClangObject.__init__(self, ptr)
-        self.diagnostics = diagnostics
 
     def __del__(self):
         TranslationUnit_dispose(self)
@@ -738,6 +724,26 @@ class TranslationUnit(ClangObject):
                                  includes)
         return iter(includes)
 
+    @property
+    def diagnostics(self):
+        """
+        Return an iterable (and indexable) object containing the diagnostics.
+        """
+        class DiagIterator:
+            def __init__(self, tu):
+                self.tu = tu
+
+            def __len__(self):
+                return int(_clang_getNumDiagnostics(self.tu))
+
+            def __getitem__(self, key):
+                diag = _clang_getDiagnostic(self.tu, key)
+                if not diag:
+                    raise IndexError
+                return Diagnostic(diag)
+
+        return DiagIterator(self)
+
 class File(ClangObject):
     """
     The File class represents a particular source file that is part of a
@@ -876,24 +882,20 @@ Cursor_visit.restype = c_uint
 
 # Index Functions
 Index_create = lib.clang_createIndex
-Index_create.argtypes = [c_int]
+Index_create.argtypes = [c_int, c_int]
 Index_create.restype = c_object_p
 
 Index_dispose = lib.clang_disposeIndex
 Index_dispose.argtypes = [Index]
 
 # Translation Unit Functions
-Diagnostic_callback = CFUNCTYPE(None, c_object_p, py_object)
-
 TranslationUnit_read = lib.clang_createTranslationUnit
-TranslationUnit_read.argtypes = [Index, c_char_p,
-                                 Diagnostic_callback, py_object]
+TranslationUnit_read.argtypes = [Index, c_char_p]
 TranslationUnit_read.restype = c_object_p
 
 TranslationUnit_parse = lib.clang_createTranslationUnitFromSourceFile
 TranslationUnit_parse.argtypes = [Index, c_char_p, c_int, c_void_p,
-                                  c_int, c_void_p,
-                                  Diagnostic_callback, py_object]
+                                  c_int, c_void_p]
 TranslationUnit_parse.restype = c_object_p
 
 TranslationUnit_cursor = lib.clang_getTranslationUnitCursor

Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang-c/Index.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -888,6 +888,12 @@ CINDEX_LINKAGE unsigned clang_isInvalid(
  */
 CINDEX_LINKAGE unsigned clang_isTranslationUnit(enum CXCursorKind);
 
+/***
+ * \brief Determine whether the given cursor represents a currently
+ *  unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
+ */
+CINDEX_LINKAGE unsigned clang_isUnexposed(enum CXCursorKind);
+
 /**
  * \brief Describe the linkage of the entity referred to by a cursor.
  */

Modified: vendor/clang/dist/include/clang/AST/ASTContext.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTContext.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/ASTContext.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -405,6 +405,8 @@ private:
   /// getExtQualType - Return a type with extended qualifiers.
   QualType getExtQualType(const Type *Base, Qualifiers Quals);
 
+  QualType getTypeDeclTypeSlow(const TypeDecl *Decl);
+
 public:
   /// getAddSpaceQualType - Return the uniqued reference to the type for an
   /// address space qualified type with the specified type and address space.
@@ -580,12 +582,26 @@ public:
 
   /// getTypeDeclType - Return the unique reference to the type for
   /// the specified type declaration.
-  QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl* PrevDecl=0);
+  QualType getTypeDeclType(const TypeDecl *Decl,
+                           const TypeDecl *PrevDecl = 0) {
+    assert(Decl && "Passed null for Decl param");
+    if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
+
+    if (PrevDecl) {
+      assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
+      Decl->TypeForDecl = PrevDecl->TypeForDecl;
+      return QualType(PrevDecl->TypeForDecl, 0);
+    }
+
+    return getTypeDeclTypeSlow(Decl);
+  }
 
   /// getTypedefType - Return the unique reference to the type for the
   /// specified typename decl.
   QualType getTypedefType(const TypedefDecl *Decl);
 
+  QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST);
+
   QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced,
                                         QualType Replacement);
 
@@ -602,6 +618,11 @@ public:
                                          const TemplateArgumentListInfo &Args,
                                          QualType Canon = QualType());
 
+  TypeSourceInfo *
+  getTemplateSpecializationTypeInfo(TemplateName T, SourceLocation TLoc,
+                                    const TemplateArgumentListInfo &Args,
+                                    QualType Canon = QualType());
+
   QualType getQualifiedNameType(NestedNameSpecifier *NNS,
                                 QualType NamedType);
   QualType getTypenameType(NestedNameSpecifier *NNS,

Modified: vendor/clang/dist/include/clang/AST/Decl.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Decl.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/Decl.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -1429,7 +1429,6 @@ class TypeDecl : public NamedDecl {
   friend class DeclContext;
   friend class TagDecl;
   friend class TemplateTypeParmDecl;
-  friend class ClassTemplateSpecializationDecl;
   friend class TagType;
 
 protected:

Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclObjC.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/DeclObjC.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -136,8 +136,12 @@ private:
   /// in, inout, etc.
   unsigned objcDeclQualifier : 6;
 
-  // Type of this method.
+  // Result type of this method.
   QualType MethodDeclType;
+  
+  // Type source information for the result type.
+  TypeSourceInfo *ResultTInfo;
+
   /// ParamInfo - List of pointers to VarDecls for the formal parameters of this
   /// Method.
   ObjCList<ParmVarDecl> ParamInfo;
@@ -158,6 +162,7 @@ private:
 
   ObjCMethodDecl(SourceLocation beginLoc, SourceLocation endLoc,
                  Selector SelInfo, QualType T,
+                 TypeSourceInfo *ResultTInfo,
                  DeclContext *contextDecl,
                  bool isInstance = true,
                  bool isVariadic = false,
@@ -168,7 +173,7 @@ private:
     IsInstance(isInstance), IsVariadic(isVariadic),
     IsSynthesized(isSynthesized),
     DeclImplementation(impControl), objcDeclQualifier(OBJC_TQ_None),
-    MethodDeclType(T),
+    MethodDeclType(T), ResultTInfo(ResultTInfo),
     EndLoc(endLoc), Body(0), SelfDecl(0), CmdDecl(0) {}
 
   virtual ~ObjCMethodDecl() {}
@@ -186,7 +191,9 @@ public:
   static ObjCMethodDecl *Create(ASTContext &C,
                                 SourceLocation beginLoc,
                                 SourceLocation endLoc, Selector SelInfo,
-                                QualType T, DeclContext *contextDecl,
+                                QualType T, 
+                                TypeSourceInfo *ResultTInfo,
+                                DeclContext *contextDecl,
                                 bool isInstance = true,
                                 bool isVariadic = false,
                                 bool isSynthesized = false,
@@ -220,6 +227,9 @@ public:
   QualType getResultType() const { return MethodDeclType; }
   void setResultType(QualType T) { MethodDeclType = T; }
 
+  TypeSourceInfo *getResultTypeSourceInfo() const { return ResultTInfo; }
+  void setResultTypeSourceInfo(TypeSourceInfo *TInfo) { ResultTInfo = TInfo; }
+
   // Iterator access to formal parameters.
   unsigned param_size() const { return ParamInfo.size(); }
   typedef ObjCList<ParmVarDecl>::iterator param_iterator;

Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclTemplate.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/DeclTemplate.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -771,6 +771,10 @@ class ClassTemplateSpecializationDecl
   llvm::PointerUnion<ClassTemplateDecl *, SpecializedPartialSpecialization *>
     SpecializedTemplate;
 
+  /// \brief The type-as-written of an explicit template specialization.
+  /// Does not apply to implicit specializations.
+  TypeSourceInfo *TypeAsWritten;
+
   /// \brief The template arguments used to describe this specialization.
   TemplateArgumentList TemplateArgs;
 
@@ -883,8 +887,14 @@ public:
 
   /// \brief Sets the type of this specialization as it was written by
   /// the user. This will be a class template specialization type.
-  void setTypeAsWritten(QualType T) {
-    TypeForDecl = T.getTypePtr();
+  void setTypeAsWritten(TypeSourceInfo *T) {
+    TypeAsWritten = T;
+  }
+
+  /// \brief Gets the type of this specialization as it was written by
+  /// the user, if it was so written.
+  TypeSourceInfo *getTypeAsWritten() const {
+    return TypeAsWritten;
   }
 
   void Profile(llvm::FoldingSetNodeID &ID) const {
@@ -921,6 +931,7 @@ class ClassTemplatePartialSpecialization
   TemplateParameterList* TemplateParams;
 
   /// \brief The source info for the template arguments as written.
+  /// FIXME: redundant with TypeAsWritten?
   TemplateArgumentLoc *ArgsAsWritten;
   unsigned NumArgsAsWritten;
 
@@ -954,6 +965,7 @@ public:
          ClassTemplateDecl *SpecializedTemplate,
          TemplateArgumentListBuilder &Builder,
          const TemplateArgumentListInfo &ArgInfos,
+         QualType CanonInjectedType,
          ClassTemplatePartialSpecializationDecl *PrevDecl);
 
   /// Get the list of template parameters
@@ -1139,8 +1151,8 @@ public:
   /// the type \p T, or NULL if no such partial specialization exists.
   ClassTemplatePartialSpecializationDecl *findPartialSpecialization(QualType T);
 
-  /// \brief Retrieve the type of the injected-class-name for this
-  /// class template.
+  /// \brief Retrieve the template specialization type of the
+  /// injected-class-name for this class template.
   ///
   /// The injected-class-name for a class template \c X is \c
   /// X<template-args>, where \c template-args is formed from the
@@ -1153,7 +1165,7 @@ public:
   ///   typedef array this_type; // "array" is equivalent to "array<T, N>"
   /// };
   /// \endcode
-  QualType getInjectedClassNameType(ASTContext &Context);
+  QualType getInjectedClassNameSpecialization(ASTContext &Context);
 
   /// \brief Retrieve the member class template that this class template was
   /// derived from.

Modified: vendor/clang/dist/include/clang/AST/ExprObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ExprObjC.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/ExprObjC.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -347,6 +347,9 @@ class ObjCMessageExpr : public Expr {
   //  message expression.
   unsigned NumArgs;
 
+  /// \brief The location of the class name in a class message.
+  SourceLocation ClassNameLoc;
+
   // A unigue name for this message.
   Selector SelName;
 
@@ -367,7 +370,8 @@ class ObjCMessageExpr : public Expr {
 public:
   /// This constructor is used to represent class messages where the
   /// ObjCInterfaceDecl* of the receiver is not known.
-  ObjCMessageExpr(ASTContext &C, IdentifierInfo *clsName, Selector selInfo,
+  ObjCMessageExpr(ASTContext &C, IdentifierInfo *clsName, 
+                  SourceLocation clsNameLoc, Selector selInfo,
                   QualType retType, ObjCMethodDecl *methDecl,
                   SourceLocation LBrac, SourceLocation RBrac,
                   Expr **ArgExprs, unsigned NumArgs);
@@ -375,7 +379,8 @@ public:
   /// This constructor is used to represent class messages where the
   /// ObjCInterfaceDecl* of the receiver is known.
   // FIXME: clsName should be typed to ObjCInterfaceType
-  ObjCMessageExpr(ASTContext &C, ObjCInterfaceDecl *cls, Selector selInfo,
+  ObjCMessageExpr(ASTContext &C, ObjCInterfaceDecl *cls, 
+                  SourceLocation clsNameLoc, Selector selInfo,
                   QualType retType, ObjCMethodDecl *methDecl,
                   SourceLocation LBrac, SourceLocation RBrac,
                   Expr **ArgExprs, unsigned NumArgs);
@@ -411,7 +416,24 @@ public:
   ObjCMethodDecl *getMethodDecl() { return MethodProto; }
   void setMethodDecl(ObjCMethodDecl *MD) { MethodProto = MD; }
 
-  typedef std::pair<ObjCInterfaceDecl*, IdentifierInfo*> ClassInfo;
+  /// \brief Describes the class receiver of a message send.
+  struct ClassInfo {
+    /// \brief The interface declaration for the class that is
+    /// receiving the message. May be NULL.
+    ObjCInterfaceDecl *Decl;
+
+    /// \brief The name of the class that is receiving the
+    /// message. This will never be NULL.
+    IdentifierInfo *Name;
+
+    /// \brief The source location of the class name.
+    SourceLocation Loc;
+
+    ClassInfo() : Decl(0), Name(0), Loc() { }
+
+    ClassInfo(ObjCInterfaceDecl *Decl, IdentifierInfo *Name, SourceLocation Loc)
+      : Decl(Decl), Name(Name), Loc(Loc) { }
+  };
 
   /// getClassInfo - For class methods, this returns both the ObjCInterfaceDecl*
   ///  and IdentifierInfo* of the invoked class.  Both can be NULL if this
@@ -423,7 +445,7 @@ public:
   /// getClassName - For class methods, this returns the invoked class,
   ///  and returns NULL otherwise.  For instance methods, use getReceiver.
   IdentifierInfo *getClassName() const {
-    return getClassInfo().second;
+    return getClassInfo().Name;
   }
 
   /// getNumArgs - Return the number of actual arguments to this call.

Modified: vendor/clang/dist/include/clang/AST/PrettyPrinter.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/PrettyPrinter.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/PrettyPrinter.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -36,7 +36,7 @@ struct PrintingPolicy {
   /// \brief Create a default printing policy for C.
   PrintingPolicy(const LangOptions &LO)
     : Indentation(2), LangOpts(LO), SuppressSpecifiers(false),
-      SuppressTag(false), SuppressTagKind(false), SuppressScope(false),
+      SuppressTag(false), SuppressScope(false),
       Dump(false), ConstantArraySizeAsWritten(false) { }
 
   /// \brief The number of spaces to use to indent each line.
@@ -71,10 +71,6 @@ struct PrintingPolicy {
   /// \endcode
   bool SuppressTag : 1;
 
-  /// \brief If we are printing a tag type, suppresses printing of the
-  /// kind of tag, e.g., "struct", "union", "enum".
-  bool SuppressTagKind : 1;
-
   /// \brief Suppresses printing of scope specifiers.
   bool SuppressScope : 1;
 
@@ -101,6 +97,7 @@ struct PrintingPolicy {
   /// char a[9] = "A string";
   /// \endcode
   bool ConstantArraySizeAsWritten : 1;
+
 };
 
 } // end namespace clang

Modified: vendor/clang/dist/include/clang/AST/RecordLayout.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/RecordLayout.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/RecordLayout.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -128,47 +128,24 @@ private:
   friend class ASTContext;
   friend class ASTRecordLayoutBuilder;
 
-  ASTRecordLayout(uint64_t size, unsigned alignment, unsigned datasize,
-                  const uint64_t *fieldoffsets, unsigned fieldcount)
-  : Size(size), DataSize(datasize), FieldOffsets(0), Alignment(alignment),
-    FieldCount(fieldcount), CXXInfo(0) {
-    if (FieldCount > 0)  {
-      FieldOffsets = new uint64_t[FieldCount];
-      for (unsigned i = 0; i < FieldCount; ++i)
-        FieldOffsets[i] = fieldoffsets[i];
-    }
-  }
+  ASTRecordLayout(ASTContext &Ctx, uint64_t size, unsigned alignment,
+                  unsigned datasize, const uint64_t *fieldoffsets,
+                  unsigned fieldcount);
 
   // Constructor for C++ records.
-  ASTRecordLayout(uint64_t size, unsigned alignment, uint64_t datasize,
+  ASTRecordLayout(ASTContext &Ctx,
+                  uint64_t size, unsigned alignment, uint64_t datasize,
                   const uint64_t *fieldoffsets, unsigned fieldcount,
                   uint64_t nonvirtualsize, unsigned nonvirtualalign,
                   const PrimaryBaseInfo &PrimaryBase,
                   const std::pair<const CXXRecordDecl *, uint64_t> *bases,
                   unsigned numbases,
                   const std::pair<const CXXRecordDecl *, uint64_t> *vbases,
-                  unsigned numvbases)
-  : Size(size), DataSize(datasize), FieldOffsets(0), Alignment(alignment),
-  FieldCount(fieldcount), CXXInfo(new CXXRecordLayoutInfo) {
-    if (FieldCount > 0)  {
-      FieldOffsets = new uint64_t[FieldCount];
-      for (unsigned i = 0; i < FieldCount; ++i)
-        FieldOffsets[i] = fieldoffsets[i];
-    }
-
-    CXXInfo->PrimaryBase = PrimaryBase;
-    CXXInfo->NonVirtualSize = nonvirtualsize;
-    CXXInfo->NonVirtualAlign = nonvirtualalign;
-    for (unsigned i = 0; i != numbases; ++i)
-      CXXInfo->BaseOffsets[bases[i].first] = bases[i].second;
-    for (unsigned i = 0; i != numvbases; ++i)
-      CXXInfo->VBaseOffsets[vbases[i].first] = vbases[i].second;
-  }
-
-  ~ASTRecordLayout() {
-    delete [] FieldOffsets;
-    delete CXXInfo;
-  }
+                  unsigned numvbases);
+
+  ~ASTRecordLayout() {}
+
+  void Destroy(ASTContext &Ctx);
 
   ASTRecordLayout(const ASTRecordLayout&);   // DO NOT IMPLEMENT
   void operator=(const ASTRecordLayout&); // DO NOT IMPLEMENT

Modified: vendor/clang/dist/include/clang/AST/Type.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Type.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/Type.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -2440,6 +2440,47 @@ public:
   static bool classof(const TemplateSpecializationType *T) { return true; }
 };
 
+/// \brief The injected class name of a C++ class template.  Used to
+/// record that a type was spelled with a bare identifier rather than
+/// as a template-id; the equivalent for non-templated classes is just
+/// RecordType.
+///
+/// For consistency, template instantiation turns these into RecordTypes.
+///
+/// The desugared form is always a unqualified TemplateSpecializationType.
+/// The canonical form is always either a TemplateSpecializationType
+/// (when dependent) or a RecordType (otherwise).
+class InjectedClassNameType : public Type {
+  CXXRecordDecl *Decl;
+
+  QualType UnderlyingType;
+
+  friend class ASTContext; // ASTContext creates these.
+  InjectedClassNameType(CXXRecordDecl *D, QualType TST, QualType Canon)
+    : Type(InjectedClassName, Canon, Canon->isDependentType()),
+      Decl(D), UnderlyingType(TST) {
+    assert(isa<TemplateSpecializationType>(TST));
+    assert(!TST.hasQualifiers());
+    assert(TST->getCanonicalTypeInternal() == Canon);
+  }
+
+public:
+  QualType getUnderlyingType() const { return UnderlyingType; }
+  const TemplateSpecializationType *getUnderlyingTST() const {
+    return cast<TemplateSpecializationType>(UnderlyingType.getTypePtr());
+  }
+
+  CXXRecordDecl *getDecl() const { return Decl; }
+
+  bool isSugared() const { return true; }
+  QualType desugar() const { return UnderlyingType; }
+
+  static bool classof(const Type *T) {
+    return T->getTypeClass() == InjectedClassName;
+  }
+  static bool classof(const InjectedClassNameType *T) { return true; }
+};
+
 /// \brief Represents a type that was referred to via a qualified
 /// name, e.g., N::M::type.
 ///

Modified: vendor/clang/dist/include/clang/AST/TypeLoc.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/TypeLoc.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/TypeLoc.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -488,6 +488,14 @@ public:
   }
 };
 
+/// \brief Wrapper for source info for injected class names of class
+/// templates.
+class InjectedClassNameTypeLoc :
+    public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
+                                     InjectedClassNameTypeLoc,
+                                     InjectedClassNameType> {
+};
+
 /// \brief Wrapper for source info for unresolved typename using decls.
 class UnresolvedUsingTypeLoc :
     public InheritingConcreteTypeLoc<TypeSpecTypeLoc,

Modified: vendor/clang/dist/include/clang/AST/TypeNodes.def
==============================================================================
--- vendor/clang/dist/include/clang/AST/TypeNodes.def	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/AST/TypeNodes.def	Wed Mar 10 17:45:58 2010	(r204962)
@@ -91,6 +91,7 @@ DEPENDENT_TYPE(TemplateTypeParm, Type)
 NON_CANONICAL_TYPE(SubstTemplateTypeParm, Type)
 NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TemplateSpecialization, Type)
 NON_CANONICAL_TYPE(QualifiedName, Type)
+NON_CANONICAL_TYPE(InjectedClassName, Type)
 DEPENDENT_TYPE(Typename, Type)
 TYPE(ObjCInterface, Type)
 TYPE(ObjCObjectPointer, Type)

Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def	Wed Mar 10 17:45:58 2010	(r204962)
@@ -284,6 +284,9 @@ BUILTIN(__builtin_ia32_roundps, "V4fV4fi
 BUILTIN(__builtin_ia32_roundss, "V4fV4fV4fi", "")
 BUILTIN(__builtin_ia32_roundsd, "V2dV2dV2di", "")
 BUILTIN(__builtin_ia32_roundpd, "V2dV2di", "")
+BUILTIN(__builtin_ia32_dpps, "V4fV4fV4fi", "")
+BUILTIN(__builtin_ia32_dppd, "V2dV2dV2di", "")
+BUILTIN(__builtin_ia32_movntdqa, "V2LLiV2LLi*", "")
 
 
 #undef BUILTIN

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Wed Mar 10 17:45:58 2010	(r204962)
@@ -90,6 +90,7 @@ def warn_drv_missing_resource_library : 
 def warn_drv_conflicting_deployment_targets : Warning<
   "conflicting deployment targets, both MACOSX_DEPLOYMENT_TARGET '%0' and IPHONEOS_DEPLOYMENT_TARGET '%1' are present in environment">;
 def warn_drv_treating_input_as_cxx : Warning<
-  "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">;
+  "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">,
+  InGroup<Deprecated>;
 
 }

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Wed Mar 10 17:45:58 2010	(r204962)
@@ -24,7 +24,6 @@ def AddressOfTemporary : DiagGroup<"addr
 def : DiagGroup<"aggregate-return">;
 def : DiagGroup<"attributes">;
 def : DiagGroup<"bad-function-cast">;
-def BadLiteral : DiagGroup<"bad-literal">;
 def : DiagGroup<"c++-compat">;
 def : DiagGroup<"cast-align">;
 def : DiagGroup<"cast-qual">;
@@ -32,6 +31,7 @@ def : DiagGroup<"char-align">;
 def Comment : DiagGroup<"comment">;
 def : DiagGroup<"ctor-dtor-privacy">;
 def : DiagGroup<"declaration-after-statement">;
+def Deprecated : DiagGroup<"deprecated">;
 def : DiagGroup<"disabled-optimization">;
 def : DiagGroup<"discard-qual">;
 def : DiagGroup<"div-by-zero">;
@@ -48,7 +48,8 @@ def : DiagGroup<"init-self">;
 def : DiagGroup<"inline">;
 def : DiagGroup<"int-to-pointer-cast">;
 def : DiagGroup<"invalid-pch">;
-def : DiagGroup<"missing-braces">;
+def LiteralRange : DiagGroup<"literal-range">;
+def MissingBraces : DiagGroup<"missing-braces">;
 def : DiagGroup<"missing-declarations">;
 def : DiagGroup<"missing-format-attribute">;
 def : DiagGroup<"missing-include-dirs">;
@@ -156,6 +157,7 @@ def Most : DiagGroup<"most", [
     Format,
     Implicit,
     MismatchedTags,
+    MissingBraces,
     MultiChar,
     ReturnType,
     Switch,
@@ -181,4 +183,4 @@ def : DiagGroup<"comments", [Comment]>; 
 // A warning group for warnings that we want to have on by default in clang,
 // but which aren't on by default in GCC.
 def NonGCC : DiagGroup<"non-gcc",
-    [SignCompare, Conversion, BadLiteral]>;
+    [SignCompare, Conversion, LiteralRange]>;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Wed Mar 10 17:45:58 2010	(r204962)
@@ -159,13 +159,13 @@ def err_typename_invalid_functionspec : 
 def err_invalid_decl_spec_combination : Error<
   "cannot combine with previous '%0' declaration specifier">;
 def err_invalid_vector_decl_spec_combination : Error<
-  "cannot combine with previous '%0' declaration specifier. \"__vector\" must be first">;
+  "cannot combine with previous '%0' declaration specifier. '__vector' must be first">;
 def err_invalid_pixel_decl_spec_combination : Error<
-  "\"__pixel\" must be preceded by \"__vector\".  '%0' declaration specifier not allowed here">;
+  "'__pixel' must be preceded by '__vector'.  '%0' declaration specifier not allowed here">;
 def err_invalid_vector_double_decl_spec_combination : Error<
-  "cannot use \"double\" with \"__vector\"">;
+  "cannot use 'double' with '__vector'">;
 def warn_vector_long_decl_spec_combination : Warning<
-  "Use of \"long\" with \"__vector\" is deprecated">;
+  "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
 def err_friend_invalid_in_context : Error<
   "'friend' used outside of class">;
 def err_unknown_typename : Error<

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Wed Mar 10 17:45:58 2010	(r204962)
@@ -31,10 +31,10 @@ def ext_predef_outside_function : Warnin
   "predefined identifier is only valid inside function">;
 def warn_float_overflow : Warning<
   "magnitude of floating-point constant too large for type %0; maximum is %1">,
-   InGroup<BadLiteral>;
+   InGroup<LiteralRange>;
 def warn_float_underflow : Warning<
   "magnitude of floating-point constant too small for type %0; minimum is %1">,
-  InGroup<BadLiteral>;
+  InGroup<LiteralRange>;
 
 // C99 Designated Initializers
 def err_array_designator_negative : Error<
@@ -141,7 +141,8 @@ def err_using_decl_conflict_reverse : Er
 def note_using_decl : Note<"%select{|previous }0using declaration">;
 
 def warn_access_decl_deprecated : Warning<
-  "access declarations are deprecated; use using declarations instead">;
+  "access declarations are deprecated; use using declarations instead">,
+  InGroup<Deprecated>;
 
 def err_invalid_thread : Error<
   "'__thread' is only allowed on variable declarations">;
@@ -1580,6 +1581,9 @@ def err_bitfield_width_exceeds_type_size
   "size of bit-field %0 exceeds size of its type (%1 bits)">;
 def err_anon_bitfield_width_exceeds_type_size : Error<
   "size of anonymous bit-field exceeds size of its type (%0 bits)">;
+def warn_missing_braces : Warning<
+  "suggest braces around initialization of subobject">,
+  InGroup<DiagGroup<"missing-braces">>, DefaultIgnore;
 
 def err_redefinition_of_label : Error<"redefinition of label '%0'">;
 def err_undeclared_label_use : Error<"use of undeclared label '%0'">;
@@ -1785,7 +1789,7 @@ def err_array_init_not_init_list : Error
   "array initializer must be an initializer "
   "list%select{| or string literal}0">;
 def warn_deprecated_string_literal_conversion : Warning<
-  "conversion from string literal to %0 is deprecated">;
+  "conversion from string literal to %0 is deprecated">, InGroup<Deprecated>;
 def err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">;
 def err_typecheck_sclass_fscope : Error<
   "illegal storage class on file-scoped variable">;
@@ -2043,11 +2047,11 @@ def note_delete_member_function_declared
   "%0 declared here">;
 def err_decrement_bool : Error<"cannot decrement expression of type bool">;
 def warn_increment_bool : Warning<
-  "incrementing expression of type bool is deprecated">;
-def err_catch_incomplete_ptr : Error<
-  "cannot catch pointer to incomplete type %0">;
-def err_catch_incomplete_ref : Error<
-  "cannot catch reference to incomplete type %0">;
+  "incrementing expression of type bool is deprecated">, InGroup<Deprecated>;
+def ext_catch_incomplete_ptr : ExtWarn<
+  "ISO C++ forbids catching a pointer to incomplete type %0">;
+def ext_catch_incomplete_ref : ExtWarn<
+  "ISO C++ forbids catching a reference to incomplete type %0">;
 def err_catch_incomplete : Error<"cannot catch incomplete type %0">;
 def err_catch_rvalue_ref : Error<"cannot catch exceptions by rvalue reference">;
 def err_qualified_catch_declarator : Error<

Modified: vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h
==============================================================================
--- vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -112,6 +112,9 @@ public:
   ///  wraps a symbol, return that SymbolRef.  Otherwise return a SymbolData*
   SymbolRef getAsLocSymbol() const;
 
+  /// Get the symbol in the SVal or its base region.
+  SymbolRef getLocSymbolInBase() const;
+
   /// getAsSymbol - If this Sval wraps a symbol return that SymbolRef.
   ///  Otherwise return a SymbolRef where 'isValid()' returns false.
   SymbolRef getAsSymbol() const;

Modified: vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CompilerInstance.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Frontend/CompilerInstance.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -439,11 +439,11 @@ public:
   /// \param OS - The output stream, which should be non-null.
   void addOutputFile(llvm::StringRef Path, llvm::raw_ostream *OS);
 
-  /// ClearOutputFiles - Clear the output file list, destroying the contained
+  /// clearOutputFiles - Clear the output file list, destroying the contained
   /// output streams.
   ///
   /// \param EraseFiles - If true, attempt to erase the files from disk.
-  void ClearOutputFiles(bool EraseFiles);
+  void clearOutputFiles(bool EraseFiles);
 
   /// }
   /// @name Construction Utility Methods

Modified: vendor/clang/dist/include/clang/Frontend/DeclXML.def
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/DeclXML.def	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Frontend/DeclXML.def	Wed Mar 10 17:45:58 2010	(r204962)
@@ -103,7 +103,7 @@ NODE_XML(FunctionDecl, "Function")
   //ATTRIBUTE_OPT_XML(isVariadic(), "variadic")       // in the type reference
   ATTRIBUTE_XML(getNumParams(), "num_args")
   SUB_NODE_SEQUENCE_XML(ParmVarDecl)
-  //SUB_NODE_OPT_XML("Body")
+  SUB_NODE_FN_BODY_XML
 END_NODE_XML
 
 NODE_XML(CXXMethodDecl, "CXXMethodDecl")
@@ -118,13 +118,9 @@ NODE_XML(CXXMethodDecl, "CXXMethodDecl")
   ATTRIBUTE_OPT_XML(isVirtual(), "virtual")
   ATTRIBUTE_XML(getNumParams(), "num_args")
   SUB_NODE_SEQUENCE_XML(ParmVarDecl)
-  //SUB_NODE_OPT_XML("Body")
+  SUB_NODE_FN_BODY_XML
 END_NODE_XML
 
-//NODE_XML("Body")
-//  SUB_NODE_XML(Stmt)
-//END_NODE_XML
-
 NODE_XML(NamespaceDecl, "Namespace")
   ID_ATTRIBUTE_XML
   ATTRIBUTE_FILE_LOCATION_XML
@@ -156,6 +152,16 @@ NODE_XML(RecordDecl, "Record")
   SUB_NODE_SEQUENCE_XML(FieldDecl)
 END_NODE_XML
 
+NODE_XML(CXXRecordDecl, "CXXRecord")
+  ID_ATTRIBUTE_XML
+  ATTRIBUTE_FILE_LOCATION_XML
+  ATTRIBUTE_XML(getDeclContext(), "context")
+  ATTRIBUTE_XML(getNameAsString(), "name")
+  ATTRIBUTE_OPT_XML(isDefinition() == false, "forward")
+  ATTRIBUTE_XML(getTypeForDecl(), "type")             // refers to the type this decl creates
+  SUB_NODE_SEQUENCE_XML(FieldDecl)
+END_NODE_XML
+
 NODE_XML(EnumDecl, "Enum")
   ID_ATTRIBUTE_XML
   ATTRIBUTE_FILE_LOCATION_XML
@@ -248,3 +254,4 @@ END_NODE_XML
 #undef SUB_NODE_XML
 #undef SUB_NODE_SEQUENCE_XML
 #undef SUB_NODE_OPT_XML
+#undef SUB_NODE_FN_BODY_XML

Modified: vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -408,7 +408,9 @@ namespace clang {
       /// \brief A SubstTemplateTypeParmType record.
       TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
       /// \brief An UnresolvedUsingType record.
-      TYPE_UNRESOLVED_USING         = 26
+      TYPE_UNRESOLVED_USING         = 26,
+      /// \brief An InjectedClassNameType record.
+      TYPE_INJECTED_CLASS_NAME      = 27
     };
 
     /// \brief The type IDs for special types constructed by semantic

Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/Preprocessor.h	Wed Mar 10 17:45:15 2010	(r204961)
+++ vendor/clang/dist/include/clang/Lex/Preprocessor.h	Wed Mar 10 17:45:58 2010	(r204962)
@@ -43,7 +43,7 @@ class ScratchBuffer;
 class TargetInfo;
 class PPCallbacks;
 class DirectoryLookup;
-  
+
 /// Preprocessor - This object engages in a tight little dance with the lexer to
 /// efficiently preprocess tokens.  Lexers know only about tokens within a
 /// single source file, and don't know anything about preprocessor-level issues
@@ -60,7 +60,7 @@ class Preprocessor {
 
   /// \brief External source of macros.
   ExternalPreprocessorSource *ExternalSource;
-  
+
   /// PTH - An optional PTHManager object used for getting tokens from
   ///  a token cache rather than lexing the original source file.
   llvm::OwningPtr<PTHManager> PTH;
@@ -105,7 +105,7 @@ class Preprocessor {
 
   /// \brief Whether we have already loaded macros from the external source.
   mutable bool ReadMacrosFromExternalSource : 1;
-  
+
   /// Identifiers - This is mapping/lookup information for all identifiers in
   /// the program, including program keywords.
   mutable IdentifierTable Identifiers;
@@ -186,7 +186,7 @@ class Preprocessor {
   /// allocation.
   /// FIXME: why not use a singly linked list?
   std::vector<MacroInfo*> MICache;
-  
+
   /// MacroArgCache - This is a "freelist" of MacroArg objects that can be
   /// reused for quick allocation.
   MacroArgs *MacroArgCache;
@@ -257,11 +257,11 @@ public:
   void setExternalSource(ExternalPreprocessorSource *Source) {
     ExternalSource = Source;
   }
-  
+
   ExternalPreprocessorSource *getExternalSource() const {
     return ExternalSource;
   }
-  
+
   /// SetCommentRetentionState - Control whether or not the preprocessor retains
   /// comments in output.
   void SetCommentRetentionState(bool KeepComments, bool KeepMacroComments) {
@@ -287,11 +287,11 @@ public:
   /// expansions going on at the time.
   PreprocessorLexer *getCurrentFileLexer() const;
 
-  /// getPPCallbacks/setPPCallbacks - Accessors for preprocessor callbacks.
+  /// getPPCallbacks/addPPCallbacks - Accessors for preprocessor callbacks.
   /// Note that this class takes ownership of any PPCallbacks object given to
   /// it.
   PPCallbacks *getPPCallbacks() const { return Callbacks; }
-  void setPPCallbacks(PPCallbacks *C) {
+  void addPPCallbacks(PPCallbacks *C) {
     if (Callbacks)
       C = new PPChainedCallbacks(C, Callbacks);
     Callbacks = C;
@@ -313,7 +313,7 @@ public:
                          MacroInfo*>::const_iterator macro_iterator;
   macro_iterator macro_begin(bool IncludeExternalMacros = true) const;
   macro_iterator macro_end(bool IncludeExternalMacros = true) const;
-  
+
   const std::string &getPredefines() const { return Predefines; }
   /// setPredefines - Set the predefines for this Preprocessor.  These
   /// predefines are automatically injected when parsing the main file.
@@ -523,7 +523,7 @@ public:

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003101745.o2AHjxmK011270>