]> granicus.if.org Git - clang/commitdiff
Avoid fallthrough in header, to allow external users of Clang libraries to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 13 Jun 2013 22:07:02 +0000 (22:07 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 13 Jun 2013 22:07:02 +0000 (22:07 +0000)
build with Clang's -Wimplicit-fallthrough warning enabled. The fallthrough
was not making this code better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183952 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h

index 3c4cbae7909ab7d6c5a2adc32d1c64da8744da2e..117a519fb63ae56ff0bd0b7a709f279e8f6c7837 100644 (file)
@@ -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: