[cfe-commits] r171354 - /cfe/trunk/lib/AST/ASTContext.cpp

Rafael Espindola rafael.espindola at gmail.com
Tue Jan 1 20:19:09 PST 2013


Author: rafael
Date: Tue Jan  1 22:19:07 2013
New Revision: 171354

URL: http://llvm.org/viewvc/llvm-project?rev=171354&view=rev
Log:
Convert an if that never happens to an assert.

Modified:
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=171354&r1=171353&r2=171354&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Jan  1 22:19:07 2013
@@ -7451,9 +7451,8 @@
     TSK = VD->getTemplateSpecializationKind();
 
   Linkage L = VD->getLinkage();
-  if (L == ExternalLinkage && getLangOpts().CPlusPlus &&
-      VD->getType()->getLinkage() == UniqueExternalLinkage)
-    L = UniqueExternalLinkage;
+  assert (!(L == ExternalLinkage && getLangOpts().CPlusPlus &&
+            VD->getType()->getLinkage() == UniqueExternalLinkage));
 
   switch (L) {
   case NoLinkage:





More information about the cfe-commits mailing list