[PATCH] D87349: [clang] adapt c++17 behavior for dependent decltype-specifiers

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 01:30:25 PDT 2020


sammccall added a comment.

We should check if the mangling matches GCC (or if it depends on -std), if we can.



================
Comment at: clang/lib/AST/Type.cpp:3429
            toTypeDependence(E->getDependence()) |
-               (E->isInstantiationDependent() ? TypeDependence::Dependent
-                                              : TypeDependence::None) |
+               (E->isTypeDependent() ? TypeDependence::Dependent
+                                     : TypeDependence::None) |
----------------
isn't this redudant with toDependence(E->getDependence)?


================
Comment at: clang/test/SemaCXX/invalid-template-base-specifier.cpp:16
+struct Crash2 : decltype(Alias<T>()) { // expected-note {{in instantiation of template type alias 'Alias' requested here}} \
+                                          expected-error {{base specifier must name a class}}
   Crash2(){};
----------------
nice!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87349/new/

https://reviews.llvm.org/D87349



More information about the cfe-commits mailing list