aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-08-27 05:09:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-08-27 05:09:36 +0000
commit2a16a138812f2f725f645cca95c41e6bd12ad14f (patch)
treebf673616ff30ea88eb2805683338fc712b6ed864
parente7624a75b74633ff9c54d1c60ace2707fe298008 (diff)
Stub out an error so we don't crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--lib/Sema/SemaDeclCXX.cpp9
2 files changed, 10 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index d376b9e68d..fe7ab08434 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -96,6 +96,8 @@ def err_using_requires_qualname : Error<
"using declaration requires a qualified name">;
def err_using_typename_non_type : Error<
"'typename' keyword used on a non-type">;
+def err_using_dependent_unsupported : Error<
+ "dependent using declaration not supported yet">;
def err_invalid_thread : Error<
"'__thread' is only allowed on variable declarations">;
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 2f797daea3..a18dc46fe7 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -2103,7 +2103,14 @@ Sema::DeclPtrTy Sema::ActOnUsingDeclaration(Scope *S,
Name = TargetName;
else
Name = Context.DeclarationNames.getCXXOperatorName(Op);
-
+
+ // FIXME: Implement this properly!
+ if (isUnknownSpecialization(SS)) {
+ Diag(IdentLoc, diag::err_using_dependent_unsupported);
+ delete AttrList;
+ return DeclPtrTy::make((UsingDecl*)0);
+ }
+
// Lookup target name.
LookupResult R = LookupParsedName(S, &SS, Name, LookupOrdinaryName, false);