[PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 14:04:42 PST 2015


majnemer added a subscriber: majnemer.

================
Comment at: lib/Sema/SemaTemplate.cpp:528
@@ +527,3 @@
+                [&StringifiedTemplateArgs, this](const TemplateArgument &TA) {
+    if (const bool IsFirst = !StringifiedTemplateArgs.size())
+      StringifiedTemplateArgs = "<";
----------------
You could use `StringifiedTemplateArgs.empty()` instead.

================
Comment at: lib/Sema/SemaTemplate.cpp:529
@@ +528,3 @@
+    if (const bool IsFirst = !StringifiedTemplateArgs.size())
+      StringifiedTemplateArgs = "<";
+    else
----------------
You could hoist this bit out of the `std::for_each`


http://reviews.llvm.org/D15005





More information about the cfe-commits mailing list