svn commit: r205219 - in vendor/clang/dist: . clang.xcodeproj include/clang-c include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Checker/PathSensitive include/clang/Driver i...

Roman Divacky rdivacky at FreeBSD.org
Tue Mar 16 16:52:16 UTC 2010


Author: rdivacky
Date: Tue Mar 16 16:52:15 2010
New Revision: 205219
URL: http://svn.freebsd.org/changeset/base/205219

Log:
  Update clang to r98631.

Added:
  vendor/clang/dist/include/clang/AST/DeclFriend.h
  vendor/clang/dist/lib/AST/DeclFriend.cpp
  vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp
  vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p7.cpp
  vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p8.cpp
  vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p9.cpp
  vendor/clang/dist/test/CodeGen/varargs.c
  vendor/clang/dist/test/PCH/changed-files.c
  vendor/clang/dist/test/Parser/missing-end.m
  vendor/clang/dist/test/Rewriter/rewrite-local-externs-in-block.mm
  vendor/clang/dist/test/Rewriter/rewrite-super-message.mm
  vendor/clang/dist/test/Sema/missing-field-initializers.c
  vendor/clang/dist/test/Sema/warn-unused-value.c
  vendor/clang/dist/test/Sema/warn-write-strings.c
  vendor/clang/dist/test/SemaCXX/PR6562.cpp
  vendor/clang/dist/test/SemaCXX/warn-unused-value.cpp
  vendor/clang/dist/test/SemaObjC/duplicate-property.m
  vendor/clang/dist/test/SemaObjC/warn-write-strings.m
Modified:
  vendor/clang/dist/Makefile
  vendor/clang/dist/clang.xcodeproj/project.pbxproj
  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/DeclBase.h
  vendor/clang/dist/include/clang/AST/DeclCXX.h
  vendor/clang/dist/include/clang/AST/DeclObjC.h
  vendor/clang/dist/include/clang/AST/DeclVisitor.h
  vendor/clang/dist/include/clang/AST/RecordLayout.h
  vendor/clang/dist/include/clang/Analysis/CFG.h
  vendor/clang/dist/include/clang/Basic/Builtins.def
  vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
  vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.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/Basic/IdentifierTable.h
  vendor/clang/dist/include/clang/Basic/LangOptions.h
  vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h
  vendor/clang/dist/include/clang/Basic/SourceLocation.h
  vendor/clang/dist/include/clang/Basic/SourceManager.h
  vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h
  vendor/clang/dist/include/clang/Driver/Action.h
  vendor/clang/dist/include/clang/Driver/ArgList.h
  vendor/clang/dist/include/clang/Driver/CC1Options.td
  vendor/clang/dist/include/clang/Driver/Job.h
  vendor/clang/dist/include/clang/Frontend/ASTUnit.h
  vendor/clang/dist/include/clang/Lex/PTHManager.h
  vendor/clang/dist/include/clang/Lex/Preprocessor.h
  vendor/clang/dist/lib/AST/ASTContext.cpp
  vendor/clang/dist/lib/AST/ASTImporter.cpp
  vendor/clang/dist/lib/AST/CMakeLists.txt
  vendor/clang/dist/lib/AST/Decl.cpp
  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/Expr.cpp
  vendor/clang/dist/lib/AST/Makefile
  vendor/clang/dist/lib/AST/RecordLayout.cpp
  vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp
  vendor/clang/dist/lib/AST/RecordLayoutBuilder.h
  vendor/clang/dist/lib/AST/TypePrinter.cpp
  vendor/clang/dist/lib/Analysis/Makefile
  vendor/clang/dist/lib/Basic/IdentifierTable.cpp
  vendor/clang/dist/lib/Basic/SourceLocation.cpp
  vendor/clang/dist/lib/Basic/SourceManager.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/Checker/GRExprEngine.cpp
  vendor/clang/dist/lib/Checker/Makefile
  vendor/clang/dist/lib/Checker/RegionStore.cpp
  vendor/clang/dist/lib/CodeGen/CGClass.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
  vendor/clang/dist/lib/CodeGen/CGDecl.cpp
  vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp
  vendor/clang/dist/lib/CodeGen/CGRTTI.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/Makefile
  vendor/clang/dist/lib/CodeGen/Mangle.cpp
  vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
  vendor/clang/dist/lib/Driver/Action.cpp
  vendor/clang/dist/lib/Driver/ArgList.cpp
  vendor/clang/dist/lib/Driver/Driver.cpp
  vendor/clang/dist/lib/Driver/Job.cpp
  vendor/clang/dist/lib/Frontend/ASTUnit.cpp
  vendor/clang/dist/lib/Frontend/CacheTokens.cpp
  vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
  vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp
  vendor/clang/dist/lib/Frontend/Makefile
  vendor/clang/dist/lib/Frontend/PCHReader.cpp
  vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp
  vendor/clang/dist/lib/Frontend/PCHWriter.cpp
  vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp
  vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp
  vendor/clang/dist/lib/Frontend/RewriteMacros.cpp
  vendor/clang/dist/lib/Frontend/RewriteObjC.cpp
  vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp
  vendor/clang/dist/lib/Headers/smmintrin.h
  vendor/clang/dist/lib/Index/Entity.cpp
  vendor/clang/dist/lib/Index/GlobalSelector.cpp
  vendor/clang/dist/lib/Index/Makefile
  vendor/clang/dist/lib/Lex/Lexer.cpp
  vendor/clang/dist/lib/Lex/LiteralSupport.cpp
  vendor/clang/dist/lib/Lex/Makefile
  vendor/clang/dist/lib/Lex/PPDirectives.cpp
  vendor/clang/dist/lib/Lex/PPExpressions.cpp
  vendor/clang/dist/lib/Lex/PPLexerChange.cpp
  vendor/clang/dist/lib/Lex/PTHLexer.cpp
  vendor/clang/dist/lib/Lex/Preprocessor.cpp
  vendor/clang/dist/lib/Lex/TokenLexer.cpp
  vendor/clang/dist/lib/Parse/Makefile
  vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp
  vendor/clang/dist/lib/Parse/ParseObjc.cpp
  vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp
  vendor/clang/dist/lib/Rewrite/Makefile
  vendor/clang/dist/lib/Rewrite/Rewriter.cpp
  vendor/clang/dist/lib/Sema/CMakeLists.txt
  vendor/clang/dist/lib/Sema/Makefile
  vendor/clang/dist/lib/Sema/Sema.h
  vendor/clang/dist/lib/Sema/SemaAccess.cpp
  vendor/clang/dist/lib/Sema/SemaCXXCast.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.cpp
  vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
  vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
  vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp
  vendor/clang/dist/lib/Sema/SemaExceptionSpec.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/SemaLookup.cpp
  vendor/clang/dist/lib/Sema/SemaOverload.cpp
  vendor/clang/dist/lib/Sema/SemaStmt.cpp
  vendor/clang/dist/lib/Sema/SemaTemplate.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/lib/Sema/TreeTransform.h
  vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp
  vendor/clang/dist/test/CXX/class.access/p4.cpp
  vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
  vendor/clang/dist/test/CodeGenCXX/PR6474.cpp
  vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp
  vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp
  vendor/clang/dist/test/CodeGenCXX/mangle-template.cpp
  vendor/clang/dist/test/CodeGenCXX/mangle.cpp
  vendor/clang/dist/test/CodeGenCXX/member-templates.cpp
  vendor/clang/dist/test/CodeGenCXX/template-linkage.cpp
  vendor/clang/dist/test/CodeGenCXX/temporaries.cpp
  vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp
  vendor/clang/dist/test/Sema/compare.c
  vendor/clang/dist/test/Sema/overloadable.c
  vendor/clang/dist/test/Sema/return.c
  vendor/clang/dist/test/SemaCXX/decl-expr-ambiguity.cpp
  vendor/clang/dist/test/SemaObjCXX/objc-pointer-conv.mm
  vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp
  vendor/clang/dist/test/SemaTemplate/virtual-member-functions.cpp
  vendor/clang/dist/tools/CIndex/CIndex.cpp
  vendor/clang/dist/tools/CIndex/CIndex.exports
  vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp
  vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp
  vendor/clang/dist/tools/CIndex/Makefile
  vendor/clang/dist/tools/Makefile
  vendor/clang/dist/tools/driver/Makefile
  vendor/clang/dist/www/analyzer/index.html
  vendor/clang/dist/www/analyzer/latest_checker.html.incl

Modified: vendor/clang/dist/Makefile
==============================================================================
--- vendor/clang/dist/Makefile	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/Makefile	Tue Mar 16 16:52:15 2010	(r205219)
@@ -39,19 +39,19 @@ cscope.files:
 
 install-local::
 	$(Echo) Installing include files
-	$(Verb) $(MKDIR) $(PROJ_includedir)
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
 	$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \
 	  cd $(PROJ_SRC_ROOT)/tools/clang/include && \
 	  for  hdr in `find . -type f '!' '(' -name '*~' \
 	      -o -name '.#*' -o -name '*.in' -o -name '*.txt' \
 	      -o -name 'Makefile' -o -name '*.td' ')' -print \
               | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
-	    instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
+	    instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
 	    if test \! -d "$$instdir" ; then \
 	      $(EchoCmd) Making install directory $$instdir ; \
 	      $(MKDIR) $$instdir ;\
 	    fi ; \
-	    $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
 	  done ; \
 	fi
 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
@@ -59,7 +59,7 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)
 	  cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
 	  for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \
             | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
-	    $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
 	  done ; \
 	fi
 endif

Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj
==============================================================================
--- vendor/clang/dist/clang.xcodeproj/project.pbxproj	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/clang.xcodeproj/project.pbxproj	Tue Mar 16 16:52:15 2010	(r205219)
@@ -49,6 +49,7 @@
 		1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVtable.cpp */; };
 		1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */; };
 		1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; };
+		1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A96785111486FDC00F24372 /* RecordLayout.cpp */; };
 		1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97825A1108BA18002B98FC /* CGVTT.cpp */; };
 		1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */; };
 		1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */; };
@@ -420,6 +421,7 @@
 		1A81AA5D108278A20094E50B /* CGVtable.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGVtable.h; path = lib/CodeGen/CGVtable.h; sourceTree = "<group>"; tabWidth = 2; };
 		1A869A6E0BA2164C008DA07A /* LiteralSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiteralSupport.h; sourceTree = "<group>"; };
 		1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralSupport.cpp; sourceTree = "<group>"; };
+		1A96785111486FDC00F24372 /* RecordLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayout.cpp; path = lib/AST/RecordLayout.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		1A97825A1108BA18002B98FC /* CGVTT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTT.cpp; path = lib/CodeGen/CGVTT.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDeclCXX.cpp; path = lib/CodeGen/CGDeclCXX.cpp; sourceTree = "<group>"; tabWidth = 2; };
 		1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayoutBuilder.cpp; path = lib/AST/RecordLayoutBuilder.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -1438,6 +1440,7 @@
 				3557D1A80EB136B100C59739 /* InheritViz.cpp */,
 				DEDFE5CE0F7206E40035BD10 /* NestedNameSpecifier.cpp */,
 				35EE48B00E0C4CCA00715C54 /* ParentMap.cpp */,
+				1A96785111486FDC00F24372 /* RecordLayout.cpp */,
 				1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */,
 				1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */,
 				DE3452400AEF1A2D00DBC861 /* Stmt.cpp */,
@@ -1993,6 +1996,7 @@
 				1A621C4411111D61009E6834 /* CIndexInclusionStack.cpp in Sources */,
 				1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */,
 				1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */,
+				1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang-c/Index.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -171,7 +171,7 @@ CINDEX_LINKAGE void clang_disposeString(
  */
 CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH,
                                          int displayDiagnostics);
-  
+
 /**
  * \brief Destroy the given index.
  *
@@ -297,7 +297,7 @@ CINDEX_LINKAGE CXSourceLocation clang_ge
  * \brief Retrieve a NULL (invalid) source range.
  */
 CINDEX_LINKAGE CXSourceRange clang_getNullRange();
-  
+
 /**
  * \brief Retrieve a source range given the beginning and ending source
  * locations.
@@ -357,11 +357,11 @@ CINDEX_LINKAGE CXSourceLocation clang_ge
  */
 enum CXDiagnosticSeverity {
   /**
-   * \brief A diagnostic that has been suppressed, e.g., by a command-line 
+   * \brief A diagnostic that has been suppressed, e.g., by a command-line
    * option.
    */
   CXDiagnostic_Ignored = 0,
-  
+
   /**
    * \brief This diagnostic is a note that should be attached to the
    * previous (non-note) diagnostic.
@@ -451,7 +451,7 @@ enum CXDiagnosticDisplayOptions {
    * diagnostic, also include information about source ranges in a
    * machine-parsable format.
    *
-   * This option corresponds to the clang flag 
+   * This option corresponds to the clang flag
    * \c -fdiagnostics-print-source-range-info.
    */
   CXDiagnostic_DisplaySourceRanges = 0x04
@@ -461,13 +461,13 @@ enum CXDiagnosticDisplayOptions {
  * \brief Format the given diagnostic in a manner that is suitable for display.
  *
  * This routine will format the given diagnostic to a string, rendering
- * the diagnostic according to the various options given. The 
- * \c clang_defaultDiagnosticDisplayOptions() function returns the set of 
+ * the diagnostic according to the various options given. The
+ * \c clang_defaultDiagnosticDisplayOptions() function returns the set of
  * options that most closely mimics the behavior of the clang compiler.
  *
  * \param Diagnostic The diagnostic to print.
  *
- * \param Options A set of options that control the diagnostic display, 
+ * \param Options A set of options that control the diagnostic display,
  * created by combining \c CXDiagnosticDisplayOptions values.
  *
  * \returns A new string containing for formatted diagnostic.
@@ -491,7 +491,7 @@ CINDEX_LINKAGE unsigned clang_defaultDia
 /**
  * \brief Determine the severity of the given diagnostic.
  */
-CINDEX_LINKAGE enum CXDiagnosticSeverity 
+CINDEX_LINKAGE enum CXDiagnosticSeverity
 clang_getDiagnosticSeverity(CXDiagnostic);
 
 /**
@@ -512,21 +512,21 @@ CINDEX_LINKAGE CXString clang_getDiagnos
  * diagnostic.
  */
 CINDEX_LINKAGE unsigned clang_getDiagnosticNumRanges(CXDiagnostic);
-  
+
 /**
  * \brief Retrieve a source range associated with the diagnostic.
  *
  * A diagnostic's source ranges highlight important elements in the source
  * code. On the command line, Clang displays source ranges by
- * underlining them with '~' characters. 
+ * underlining them with '~' characters.
  *
  * \param Diagnostic the diagnostic whose range is being extracted.
  *
- * \param Range the zero-based index specifying which range to 
+ * \param Range the zero-based index specifying which range to
  *
  * \returns the requested source range.
  */
-CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic, 
+CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic,
                                                       unsigned Range);
 
 /**
@@ -560,7 +560,7 @@ CINDEX_LINKAGE unsigned clang_getDiagnos
  * \returns A string containing text that should be replace the source
  * code indicated by the \c ReplacementRange.
  */
-CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, 
+CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic,
                                                  unsigned FixIt,
                                                CXSourceRange *ReplacementRange);
 
@@ -577,7 +577,7 @@ CINDEX_LINKAGE CXString clang_getDiagnos
  *
  * @{
  */
-  
+
 /**
  * \brief Get the original translation unit source file name.
  */
@@ -625,22 +625,22 @@ CINDEX_LINKAGE CXTranslationUnit clang_c
                                          const char **clang_command_line_args,
                                          unsigned num_unsaved_files,
                                          struct CXUnsavedFile *unsaved_files);
- 
+
 /**
  * \brief Create a translation unit from an AST file (-emit-ast).
  */
-CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex, 
+CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex,
                                              const char *ast_filename);
 
 /**
  * \brief Destroy the specified CXTranslationUnit object.
  */
 CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit);
- 
+
 /**
  * @}
  */
-  
+
 /**
  * \brief Describes the kind of entity that a cursor refers to.
  */
@@ -1083,6 +1083,47 @@ CINDEX_LINKAGE unsigned clang_visitChild
 CINDEX_LINKAGE CXString clang_getCursorUSR(CXCursor);
 
 /**
+ * \brief Construct a USR for a specified Objective-C class.
+ */
+CINDEX_LINKAGE CXString clang_constructUSR_ObjCClass(const char *class_name);
+
+/**
+ * \brief Construct a USR for a specified Objective-C category.
+ */
+CINDEX_LINKAGE CXString
+  clang_constructUSR_ObjCCategory(const char *class_name,
+                                 const char *category_name);
+
+/**
+ * \brief Construct a USR for a specified Objective-C protocol.
+ */
+CINDEX_LINKAGE CXString
+  clang_constructUSR_ObjCProtocol(const char *protocol_name);
+
+
+/**
+ * \brief Construct a USR for a specified Objective-C instance variable and
+ *   the USR for its containing class.
+ */
+CINDEX_LINKAGE CXString clang_constructUSR_ObjCIvar(const char *name,
+                                                    CXString classUSR);
+
+/**
+ * \brief Construct a USR for a specified Objective-C method and
+ *   the USR for its containing class.
+ */
+CINDEX_LINKAGE CXString clang_constructUSR_ObjCMethod(const char *name,
+                                                      unsigned isInstanceMethod,
+                                                      CXString classUSR);
+
+/**
+ * \brief Construct a USR for a specified Objective-C property and the USR
+ *  for its containing class.
+ */
+CINDEX_LINKAGE CXString clang_constructUSR_ObjCProperty(const char *property,
+                                                        CXString classUSR);
+
+/**
  * \brief Retrieve a name for the entity referenced by this cursor.
  */
 CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor);
@@ -1157,22 +1198,22 @@ typedef enum CXTokenKind {
    * \brief A token that contains some kind of punctuation.
    */
   CXToken_Punctuation,
-  
+
   /**
    * \brief A language keyword.
    */
   CXToken_Keyword,
-  
+
   /**
    * \brief An identifier (that is not a keyword).
    */
   CXToken_Identifier,
-  
+
   /**
    * \brief A numeric, string, or character literal.
    */
   CXToken_Literal,
-  
+
   /**
    * \brief A comment.
    */
@@ -1191,7 +1232,7 @@ typedef struct {
  * \brief Determine the kind of the given token.
  */
 CINDEX_LINKAGE CXTokenKind clang_getTokenKind(CXToken);
-  
+
 /**
  * \brief Determine the spelling of the given token.
  *
@@ -1199,13 +1240,13 @@ CINDEX_LINKAGE CXTokenKind clang_getToke
  * the text of an identifier or keyword.
  */
 CINDEX_LINKAGE CXString clang_getTokenSpelling(CXTranslationUnit, CXToken);
-  
+
 /**
  * \brief Retrieve the source location of the given token.
  */
-CINDEX_LINKAGE CXSourceLocation clang_getTokenLocation(CXTranslationUnit, 
+CINDEX_LINKAGE CXSourceLocation clang_getTokenLocation(CXTranslationUnit,
                                                        CXToken);
-  
+
 /**
  * \brief Retrieve a source range that covers the given token.
  */
@@ -1230,7 +1271,7 @@ CINDEX_LINKAGE CXSourceRange clang_getTo
  */
 CINDEX_LINKAGE void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,
                                    CXToken **Tokens, unsigned *NumTokens);
-  
+
 /**
  * \brief Annotate the given set of tokens by providing cursors for each token
  * that can be mapped to a specific entity within the abstract syntax tree.
@@ -1264,17 +1305,17 @@ CINDEX_LINKAGE void clang_tokenize(CXTra
 CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU,
                                          CXToken *Tokens, unsigned NumTokens,
                                          CXCursor *Cursors);
-  
+
 /**
  * \brief Free the given set of tokens.
  */
-CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, 
+CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU,
                                         CXToken *Tokens, unsigned NumTokens);
-  
+
 /**
  * @}
  */
-  
+
 /**
  * \defgroup CINDEX_DEBUG Debugging facilities
  *
@@ -1689,7 +1730,7 @@ void clang_disposeCodeCompleteResults(CX
  * \brief Determine the number of diagnostics produced prior to the
  * location where code completion was performed.
  */
-CINDEX_LINKAGE 
+CINDEX_LINKAGE
 unsigned clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults *Results);
 
 /**
@@ -1701,7 +1742,7 @@ unsigned clang_codeCompleteGetNumDiagnos
  * \returns the requested diagnostic. This diagnostic must be freed
  * via a call to \c clang_disposeDiagnostic().
  */
-CINDEX_LINKAGE 
+CINDEX_LINKAGE
 CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results,
                                              unsigned Index);
 
@@ -1726,10 +1767,10 @@ CINDEX_LINKAGE CXString clang_getClangVe
  * \brief Return a version string, suitable for showing to a user, but not
  *        intended to be parsed (the format is not guaranteed to be stable).
  */
- 
- 
+
+
  /**
-  * \brief Visitor invoked for each file in a translation unit 
+  * \brief Visitor invoked for each file in a translation unit
   *        (used with clang_getInclusions()).
   *
   * This visitor function will be invoked by clang_getInclusions() for each

Modified: vendor/clang/dist/include/clang/AST/ASTContext.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTContext.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/ASTContext.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -40,6 +40,7 @@ namespace clang {
   class ASTRecordLayout;
   class BlockExpr;
   class CharUnits;
+  class Diagnostic;
   class Expr;
   class ExternalASTSource;
   class IdentifierTable;
@@ -950,8 +951,6 @@ public:
                                llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
   void CollectNonClassIvars(const ObjCInterfaceDecl *OI,
                                llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
-  void CollectProtocolSynthesizedIvars(const ObjCProtocolDecl *PD,
-                               llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
   unsigned CountSynthesizedIvars(const ObjCInterfaceDecl *OI);
   unsigned CountProtocolSynthesizedIvars(const ObjCProtocolDecl *PD);
   void CollectInheritedProtocols(const Decl *CDecl,

Modified: vendor/clang/dist/include/clang/AST/Decl.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Decl.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/Decl.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -319,7 +319,19 @@ public:
 /// \brief Represents a ValueDecl that came out of a declarator.
 /// Contains type source information through TypeSourceInfo.
 class DeclaratorDecl : public ValueDecl {
-  TypeSourceInfo *DeclInfo;
+  // A struct representing both a TInfo and a syntactic qualifier,
+  // to be used for the (uncommon) case of out-of-line declarations.
+  struct ExtInfo {
+    TypeSourceInfo *TInfo;
+    NestedNameSpecifier *NNS;
+    SourceRange NNSRange;
+  };
+
+  llvm::PointerUnion<TypeSourceInfo*, ExtInfo*> DeclInfo;
+
+  bool hasExtInfo() const { return DeclInfo.is<ExtInfo*>(); }
+  ExtInfo *getExtInfo() { return DeclInfo.get<ExtInfo*>(); }
+  const ExtInfo *getExtInfo() const { return DeclInfo.get<ExtInfo*>(); }
 
 protected:
   DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L,
@@ -327,8 +339,29 @@ protected:
     : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo) {}
 
 public:
-  TypeSourceInfo *getTypeSourceInfo() const { return DeclInfo; }
-  void setTypeSourceInfo(TypeSourceInfo *TInfo) { DeclInfo = TInfo; }
+  virtual ~DeclaratorDecl();
+  virtual void Destroy(ASTContext &C);
+
+  TypeSourceInfo *getTypeSourceInfo() const {
+    return hasExtInfo()
+      ? DeclInfo.get<ExtInfo*>()->TInfo
+      : DeclInfo.get<TypeSourceInfo*>();
+  }
+  void setTypeSourceInfo(TypeSourceInfo *TI) {
+    if (hasExtInfo())
+      DeclInfo.get<ExtInfo*>()->TInfo = TI;
+    else
+      DeclInfo = TI;
+  }
+
+  NestedNameSpecifier *getQualifier() const {
+    return hasExtInfo() ? DeclInfo.get<ExtInfo*>()->NNS : 0;
+  }
+  SourceRange getQualifierRange() const {
+    return hasExtInfo() ? DeclInfo.get<ExtInfo*>()->NNSRange : SourceRange();
+  }
+  void setQualifierInfo(NestedNameSpecifier *Qualifier,
+                        SourceRange QualifierRange);
 
   SourceLocation getTypeSpecStartLoc() const;
 
@@ -500,7 +533,8 @@ public:
   bool isExternC() const;
 
   /// isBlockVarDecl - Returns true for local variable declarations.  Note that
-  /// this includes static variables inside of functions.
+  /// this includes static variables inside of functions. It also includes
+  /// variables inside blocks.
   ///
   ///   void foo() { int x; static int y; extern int z; }
   ///
@@ -512,6 +546,17 @@ public:
     return false;
   }
 
+  /// isFunctionOrMethodVarDecl - Similar to isBlockVarDecl, but excludes
+  /// variables declared in blocks.
+  bool isFunctionOrMethodVarDecl() const {
+    if (getKind() != Decl::Var)
+      return false;
+    if (const DeclContext *DC = getDeclContext())
+      return DC->getLookupContext()->isFunctionOrMethod() &&
+             DC->getLookupContext()->getDeclKind() != Decl::Block;
+    return false;
+  }
+
   /// \brief Determines whether this is a static data member.
   ///
   /// This will only be true in C++, and applies to, e.g., the
@@ -797,12 +842,14 @@ class ParmVarDecl : public VarDecl {
   /// FIXME: Also can be paced into the bitfields in Decl.
   /// in, inout, etc.
   unsigned objcDeclQualifier : 6;
+  bool HasInheritedDefaultArg : 1;
 
 protected:
   ParmVarDecl(Kind DK, DeclContext *DC, SourceLocation L,
               IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo,
               StorageClass S, Expr *DefArg)
-  : VarDecl(DK, DC, L, Id, T, TInfo, S), objcDeclQualifier(OBJC_TQ_None) {
+  : VarDecl(DK, DC, L, Id, T, TInfo, S),
+    objcDeclQualifier(OBJC_TQ_None), HasInheritedDefaultArg(false) {
     setDefaultArg(DefArg);
   }
 
@@ -881,6 +928,14 @@ public:
     Init = (UnparsedDefaultArgument *)0;
   }
 
+  bool hasInheritedDefaultArg() const {
+    return HasInheritedDefaultArg;
+  }
+
+  void setHasInheritedDefaultArg(bool I = true) {
+    HasInheritedDefaultArg = I;
+  }
+
   QualType getOriginalType() const {
     if (getTypeSourceInfo())
       return getTypeSourceInfo()->getType();
@@ -1512,22 +1567,38 @@ private:
 
   /// IsEmbeddedInDeclarator - True if this tag declaration is
   /// "embedded" (i.e., defined or declared for the very first time)
-  /// in the syntax of a declarator,
+  /// in the syntax of a declarator.
   bool IsEmbeddedInDeclarator : 1;
 
-  /// TypedefForAnonDecl - If a TagDecl is anonymous and part of a typedef,
-  /// this points to the TypedefDecl. Used for mangling.
-  TypedefDecl *TypedefForAnonDecl;
-
   SourceLocation TagKeywordLoc;
   SourceLocation RBraceLoc;
 
+  // A struct representing syntactic qualifier info,
+  // to be used for the (uncommon) case of out-of-line declarations.
+  struct ExtInfo {
+    NestedNameSpecifier *NNS;
+    SourceRange NNSRange;
+  };
+
+  /// TypedefDeclOrQualifier - If the (out-of-line) tag declaration name
+  /// is qualified, it points to the qualifier info (nns and range);
+  /// otherwise, if the tag declaration is anonymous and it is part of
+  /// a typedef, it points to the TypedefDecl (used for mangling);
+  /// otherwise, it is a null (TypedefDecl) pointer.
+  llvm::PointerUnion<TypedefDecl*, ExtInfo*> TypedefDeclOrQualifier;
+
+  bool hasExtInfo() const { return TypedefDeclOrQualifier.is<ExtInfo*>(); }
+  ExtInfo *getExtInfo() { return TypedefDeclOrQualifier.get<ExtInfo*>(); }
+  const ExtInfo *getExtInfo() const {
+    return TypedefDeclOrQualifier.get<ExtInfo*>();
+  }
+
 protected:
-  TagDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L,
-          IdentifierInfo *Id, TagDecl *PrevDecl,
-          SourceLocation TKL = SourceLocation())
-    : TypeDecl(DK, DC, L, Id), DeclContext(DK), TypedefForAnonDecl(0),
-      TagKeywordLoc(TKL) {
+  TagDecl(Kind DK, TagKind TK, DeclContext *DC,
+          SourceLocation L, IdentifierInfo *Id,
+          TagDecl *PrevDecl, SourceLocation TKL = SourceLocation())
+    : TypeDecl(DK, DC, L, Id), DeclContext(DK), TagKeywordLoc(TKL),
+      TypedefDeclOrQualifier((TypedefDecl*) 0) {
     assert((DK != Enum || TK == TK_enum) &&"EnumDecl not matched with TK_enum");
     TagDeclKind = TK;
     IsDefinition = false;
@@ -1539,6 +1610,8 @@ protected:
   virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
 
 public:
+  void Destroy(ASTContext &C);
+
   typedef redeclarable_base::redecl_iterator redecl_iterator;
   redecl_iterator redecls_begin() const {
     return redeclarable_base::redecls_begin();
@@ -1618,8 +1691,21 @@ public:
   bool isUnion()  const { return getTagKind() == TK_union; }
   bool isEnum()   const { return getTagKind() == TK_enum; }
 
-  TypedefDecl *getTypedefForAnonDecl() const { return TypedefForAnonDecl; }
-  void setTypedefForAnonDecl(TypedefDecl *TDD) { TypedefForAnonDecl = TDD; }
+  TypedefDecl *getTypedefForAnonDecl() const {
+    return hasExtInfo() ? 0 : TypedefDeclOrQualifier.get<TypedefDecl*>();
+  }
+  void setTypedefForAnonDecl(TypedefDecl *TDD) { TypedefDeclOrQualifier = TDD; }
+
+  NestedNameSpecifier *getQualifier() const {
+    return hasExtInfo() ? TypedefDeclOrQualifier.get<ExtInfo*>()->NNS : 0;
+  }
+  SourceRange getQualifierRange() const {
+    return hasExtInfo()
+      ? TypedefDeclOrQualifier.get<ExtInfo*>()->NNSRange
+      : SourceRange();
+  }
+  void setQualifierInfo(NestedNameSpecifier *Qualifier,
+                        SourceRange QualifierRange);
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }

Modified: vendor/clang/dist/include/clang/AST/DeclBase.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclBase.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/DeclBase.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -660,7 +660,7 @@ public:
   /// \brief Determine whether this declaration context is equivalent
   /// to the declaration context DC.
   bool Equals(DeclContext *DC) {
-    return this->getPrimaryContext() == DC->getPrimaryContext();
+    return DC && this->getPrimaryContext() == DC->getPrimaryContext();
   }
 
   /// \brief Determine whether this declaration context encloses the

Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclCXX.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/DeclCXX.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -7,7 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  This file defines the C++ Decl subclasses.
+//  This file defines the C++ Decl subclasses, other than those for
+//  templates (in DeclTemplate.h) and friends (in DeclFriend.h).
 //
 //===----------------------------------------------------------------------===//
 
@@ -32,6 +33,7 @@ class CXXDestructorDecl;
 class CXXMethodDecl;
 class CXXRecordDecl;
 class CXXMemberLookupCriteria;
+class FriendDecl;
   
 /// \brief Represents any kind of function declaration, whether it is a
 /// concrete function or a function template.
@@ -298,6 +300,11 @@ class CXXRecordDecl : public RecordDecl 
     /// Definition - The declaration which defines this record.
     CXXRecordDecl *Definition;
 
+    /// FirstFriend - The first friend declaration in this class, or
+    /// null if there aren't any.  This is actually currently stored
+    /// in reverse order.
+    FriendDecl *FirstFriend;
+
   } *DefinitionData;
 
   struct DefinitionData &data() {
@@ -322,12 +329,6 @@ class CXXRecordDecl : public RecordDecl 
   llvm::PointerUnion<ClassTemplateDecl*, MemberSpecializationInfo*>
     TemplateOrInstantiation;
   
-  void getNestedVisibleConversionFunctions(CXXRecordDecl *RD,
-          const llvm::SmallPtrSet<CanQualType, 8> &TopConversionsTypeSet,
-          const llvm::SmallPtrSet<CanQualType, 8> &HiddenConversionTypes);
-  void collectConversionFunctions(
-    llvm::SmallPtrSet<CanQualType, 8>& ConversionsTypeSet) const;
-  
 protected:
   CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC,
                 SourceLocation L, IdentifierInfo *Id,
@@ -458,6 +459,13 @@ public:
     return ctor_iterator(decls_end());
   }
 
+  /// An iterator over friend declarations.  All of these are defined
+  /// in DeclFriend.h.
+  class friend_iterator;
+  friend_iterator friend_begin() const;
+  friend_iterator friend_end() const;
+  void pushFriendDecl(FriendDecl *FD);
+
   /// hasConstCopyConstructor - Determines whether this class has a
   /// copy constructor that accepts a const-qualified argument.
   bool hasConstCopyConstructor(ASTContext &Context) const;
@@ -545,14 +553,6 @@ public:
   /// in current class; including conversion function templates.
   const UnresolvedSetImpl *getVisibleConversionFunctions();
 
-  /// addVisibleConversionFunction - Add a new conversion function to the
-  /// list of visible conversion functions.
-  void addVisibleConversionFunction(CXXConversionDecl *ConvDecl);
-  
-  /// \brief Add a new conversion function template to the list of visible
-  /// conversion functions.
-  void addVisibleConversionFunction(FunctionTemplateDecl *ConvDecl);
-  
   /// addConversionFunction - Add a new conversion function to the
   /// list of conversion functions.
   void addConversionFunction(CXXConversionDecl *ConvDecl);
@@ -1385,77 +1385,6 @@ public:
   static bool classofKind(Kind K) { return K == CXXConversion; }
 };
 
-/// FriendDecl - Represents the declaration of a friend entity,
-/// which can be a function, a type, or a templated function or type.
-//  For example:
-///
-/// @code
-/// template <typename T> class A {
-///   friend int foo(T);
-///   friend class B;
-///   friend T; // only in C++0x
-///   template <typename U> friend class C;
-///   template <typename U> friend A& operator+=(A&, const U&) { ... }
-/// };
-/// @endcode
-///
-/// The semantic context of a friend decl is its declaring class.
-class FriendDecl : public Decl {
-public:
-  typedef llvm::PointerUnion<NamedDecl*,Type*> FriendUnion;
-
-private:
-  // The declaration that's a friend of this class.
-  FriendUnion Friend;
-
-  // Location of the 'friend' specifier.
-  SourceLocation FriendLoc;
-
-  // FIXME: Hack to keep track of whether this was a friend function
-  // template specialization.
-  bool WasSpecialization;
-
-  FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend,
-             SourceLocation FriendL)
-    : Decl(Decl::Friend, DC, L),
-      Friend(Friend),
-      FriendLoc(FriendL),
-      WasSpecialization(false) {
-  }
-
-public:
-  static FriendDecl *Create(ASTContext &C, DeclContext *DC,
-                            SourceLocation L, FriendUnion Friend_,
-                            SourceLocation FriendL);
-
-  /// If this friend declaration names an (untemplated but
-  /// possibly dependent) type, return the type;  otherwise
-  /// return null.  This is used only for C++0x's unelaborated
-  /// friend type declarations.
-  Type *getFriendType() const {
-    return Friend.dyn_cast<Type*>();
-  }
-
-  /// If this friend declaration doesn't name an unelaborated
-  /// type, return the inner declaration.
-  NamedDecl *getFriendDecl() const {
-    return Friend.dyn_cast<NamedDecl*>();
-  }
-
-  /// Retrieves the location of the 'friend' keyword.
-  SourceLocation getFriendLoc() const {
-    return FriendLoc;
-  }
-
-  bool wasSpecialization() const { return WasSpecialization; }
-  void setSpecialization(bool WS) { WasSpecialization = WS; }
-
-  // Implement isa/cast/dyncast/etc.
-  static bool classof(const Decl *D) { return classofKind(D->getKind()); }
-  static bool classof(const FriendDecl *D) { return true; }
-  static bool classofKind(Kind K) { return K == Decl::Friend; }
-};
-
 /// LinkageSpecDecl - This represents a linkage specification.  For example:
 ///   extern "C" void foo();
 ///

Added: vendor/clang/dist/include/clang/AST/DeclFriend.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/clang/dist/include/clang/AST/DeclFriend.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -0,0 +1,167 @@
+//===-- DeclFriend.h - Classes for C++ friend declarations -*- C++ -*------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the section of the AST representing C++ friend
+// declarations.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_AST_DECLFRIEND_H
+#define LLVM_CLANG_AST_DECLFRIEND_H
+
+#include "clang/AST/DeclCXX.h"
+
+namespace clang {
+
+/// FriendDecl - Represents the declaration of a friend entity,
+/// which can be a function, a type, or a templated function or type.
+//  For example:
+///
+/// @code
+/// template <typename T> class A {
+///   friend int foo(T);
+///   friend class B;
+///   friend T; // only in C++0x
+///   template <typename U> friend class C;
+///   template <typename U> friend A& operator+=(A&, const U&) { ... }
+/// };
+/// @endcode
+///
+/// The semantic context of a friend decl is its declaring class.
+class FriendDecl : public Decl {
+public:
+  typedef llvm::PointerUnion<NamedDecl*,Type*> FriendUnion;
+
+private:
+  // The declaration that's a friend of this class.
+  FriendUnion Friend;
+
+  // A pointer to the next friend in the sequence.
+  FriendDecl *NextFriend;
+
+  // Location of the 'friend' specifier.
+  SourceLocation FriendLoc;
+
+  // FIXME: Hack to keep track of whether this was a friend function
+  // template specialization.
+  bool WasSpecialization;
+
+  friend class CXXRecordDecl::friend_iterator;
+  friend class CXXRecordDecl;
+
+  FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend,
+             SourceLocation FriendL)
+    : Decl(Decl::Friend, DC, L),
+      Friend(Friend),
+      NextFriend(0),
+      FriendLoc(FriendL),
+      WasSpecialization(false) {
+  }
+
+public:
+  static FriendDecl *Create(ASTContext &C, DeclContext *DC,
+                            SourceLocation L, FriendUnion Friend_,
+                            SourceLocation FriendL);
+
+  /// If this friend declaration names an (untemplated but
+  /// possibly dependent) type, return the type;  otherwise
+  /// return null.  This is used only for C++0x's unelaborated
+  /// friend type declarations.
+  Type *getFriendType() const {
+    return Friend.dyn_cast<Type*>();
+  }
+
+  /// If this friend declaration doesn't name an unelaborated
+  /// type, return the inner declaration.
+  NamedDecl *getFriendDecl() const {
+    return Friend.dyn_cast<NamedDecl*>();
+  }
+
+  /// Retrieves the location of the 'friend' keyword.
+  SourceLocation getFriendLoc() const {
+    return FriendLoc;
+  }
+
+  bool wasSpecialization() const { return WasSpecialization; }
+  void setSpecialization(bool WS) { WasSpecialization = WS; }
+
+  // Implement isa/cast/dyncast/etc.
+  static bool classof(const Decl *D) { return classofKind(D->getKind()); }
+  static bool classof(const FriendDecl *D) { return true; }
+  static bool classofKind(Kind K) { return K == Decl::Friend; }
+};
+
+/// An iterator over the friend declarations of a class.
+class CXXRecordDecl::friend_iterator {
+  FriendDecl *Ptr;
+
+  friend class CXXRecordDecl;
+  explicit friend_iterator(FriendDecl *Ptr) : Ptr(Ptr) {}
+public:
+  friend_iterator() {}
+
+  typedef FriendDecl *value_type;
+  typedef FriendDecl *reference;
+  typedef FriendDecl *pointer;
+  typedef int difference_type;
+  typedef std::forward_iterator_tag iterator_category;
+
+  reference operator*() const { return Ptr; }
+
+  friend_iterator &operator++() {
+    assert(Ptr && "attempt to increment past end of friend list");
+    Ptr = Ptr->NextFriend;
+    return *this;
+  }
+
+  friend_iterator operator++(int) {
+    friend_iterator tmp = *this;
+    ++*this;
+    return tmp;
+  }
+
+  bool operator==(const friend_iterator &Other) const {
+    return Ptr == Other.Ptr;
+  }
+
+  bool operator!=(const friend_iterator &Other) const {
+    return Ptr != Other.Ptr;
+  }
+
+  friend_iterator &operator+=(difference_type N) {
+    assert(N >= 0 && "cannot rewind a CXXRecordDecl::friend_iterator");
+    while (N--)
+      ++*this;
+    return *this;
+  }
+
+  friend_iterator operator+(difference_type N) const {
+    friend_iterator tmp = *this;
+    tmp += N;
+    return tmp;
+  }
+};
+
+inline CXXRecordDecl::friend_iterator CXXRecordDecl::friend_begin() const {
+  return friend_iterator(data().FirstFriend);
+}
+
+inline CXXRecordDecl::friend_iterator CXXRecordDecl::friend_end() const {
+  return friend_iterator(0);
+}
+
+inline void CXXRecordDecl::pushFriendDecl(FriendDecl *FD) {
+  assert(FD->NextFriend == 0 && "friend already has next friend?");
+  FD->NextFriend = data().FirstFriend;
+  data().FirstFriend = FD;
+}
+  
+}
+
+#endif

Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclObjC.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/DeclObjC.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -381,8 +381,6 @@ public:
   ObjCIvarDecl *getIvarDecl(IdentifierInfo *Id) const;
 
   ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const;
-  ObjCPropertyDecl *FindPropertyVisibleInPrimaryClass(
-                                            IdentifierInfo *PropertyId) const;
 
   // Marks the end of the container.
   SourceRange getAtEndRange() const {
@@ -445,9 +443,6 @@ class ObjCInterfaceDecl : public ObjCCon
   /// Protocols referenced in interface header declaration
   ObjCProtocolList ReferencedProtocols;
 
-  /// Instance variables in the interface. This list is completely redundant.
-  ObjCList<ObjCIvarDecl> IVars;
-
   /// List of categories defined for this class.
   /// FIXME: Why is this a linked list??
   ObjCCategoryDecl *CategoryList;
@@ -538,7 +533,10 @@ public:
   }
 
   ObjCCategoryDecl* getClassExtension() const;
-  
+
+  ObjCPropertyDecl
+    *FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const;
+
   /// isSuperClassOf - Return true if this class is the specified class or is a
   /// super class of the specified interface class.
   bool isSuperClassOf(const ObjCInterfaceDecl *I) const {
@@ -1330,6 +1328,10 @@ public:
     return PropertyIvarDecl;
   }
 
+  /// Lookup a property by name in the specified DeclContext.
+  static ObjCPropertyDecl *findPropertyDecl(const DeclContext *DC,
+                                            IdentifierInfo *propertyID);
+
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }
   static bool classof(const ObjCPropertyDecl *D) { return true; }
   static bool classofKind(Kind K) { return K == ObjCProperty; }

Modified: vendor/clang/dist/include/clang/AST/DeclVisitor.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclVisitor.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/DeclVisitor.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -16,6 +16,7 @@
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclCXX.h"
+#include "clang/AST/DeclFriend.h"
 #include "clang/AST/DeclTemplate.h"
 
 namespace clang {

Modified: vendor/clang/dist/include/clang/AST/RecordLayout.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/RecordLayout.h	Tue Mar 16 16:51:38 2010	(r205218)
+++ vendor/clang/dist/include/clang/AST/RecordLayout.h	Tue Mar 16 16:52:15 2010	(r205219)
@@ -112,13 +112,14 @@ private:
     /// PrimaryBase - The primary base info for this record.
     PrimaryBaseInfo PrimaryBase;
     
-    /// BaseOffsets - Contains a map from base classes to their offset.
     /// FIXME: This should really use a SmallPtrMap, once we have one in LLVM :)
-    llvm::DenseMap<const CXXRecordDecl *, uint64_t> BaseOffsets;
+    typedef llvm::DenseMap<const CXXRecordDecl *, uint64_t> BaseOffsetsMapTy;
+    
+    /// BaseOffsets - Contains a map from base classes to their offset.
+    BaseOffsetsMapTy BaseOffsets;
 
     /// VBaseOffsets - Contains a map from vbase classes to their offset.
-    /// FIXME: This should really use a SmallPtrMap, once we have one in LLVM :)
-    llvm::DenseMap<const CXXRecordDecl *, uint64_t> VBaseOffsets;
+    BaseOffsetsMapTy VBaseOffsets;
   };
 
   /// CXXInfo - If the record layout is for a C++ record, this will have
@@ -133,15 +134,14 @@ private:
                   unsigned fieldcount);
 
   // Constructor for C++ records.
+  typedef CXXRecordLayoutInfo::BaseOffsetsMapTy BaseOffsetsMapTy;

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


More information about the svn-src-all mailing list