r183952 - Avoid fallthrough in header, to allow external users of Clang libraries to

Richard Smith richard-llvm at metafoo.co.uk
Thu Jun 13 15:07:02 PDT 2013


Author: rsmith
Date: Thu Jun 13 17:07:02 2013
New Revision: 183952

URL: http://llvm.org/viewvc/llvm-project?rev=183952&view=rev
Log:
Avoid fallthrough in header, to allow external users of Clang libraries to
build with Clang's -Wimplicit-fallthrough warning enabled. The fallthrough
was not making this code better.

Modified:
    cfe/trunk/include/clang/Sema/Sema.h

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=183952&r1=183951&r2=183952&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Thu Jun 13 17:07:02 2013
@@ -5867,10 +5867,7 @@ public:
 
       case PriorTemplateArgumentSubstitution:
       case DefaultTemplateArgumentChecking:
-        if (X.Template != Y.Template)
-          return false;
-
-        // Fall through
+        return X.Template == Y.Template && X.TemplateArgs == Y.TemplateArgs;
 
       case DefaultTemplateArgumentInstantiation:
       case ExplicitTemplateArgumentSubstitution:





More information about the cfe-commits mailing list