efriedma added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplate.cpp:6490-6491
 
   // C++11 [temp.arg.nontype]p1:
   //   - an address constant expression of type std::nullptr_t
   if (Arg->getType()->isNullPtrType())
----------------
aaron.ballman wrote:
> It's worth noting that the rules we follow changed slightly: 
> http://eel.is/c++draft/temp.arg.nontype#2 so if we're making repairs in this 
> area, are there broader changes we need to consider? (That's fine as a FIXME 
> comment if the changes end up being unrelated to this specific fix.)
C++17 significantly revamped the rules for template arguments; we don't use 
this code at all for C++17 or later.  (It might be worth considering 
re-unifying the codepaths to some extent; first evaluate under the C++17 rules, 
then verify if the argument is valid under the earlier standard's rules.  But I 
really just wanted to write a quick bugfix for the obvious miscompile, not 
completely rewrite the code.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134928

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to