[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 07:33:46 PDT 2023


aaron.ballman added inline comments.


================
Comment at: clang/test/AST/Interp/literals.cpp:849
+    static_assert(strings_match(__func__, "foo"));
+    static_assert(strings_match(__PRETTY_FUNCTION__, "void PredefinedExprs::foo()"));
+  }
----------------
You should add coverage for the others as well:
```
  enum IdentKind {
    Func,
    Function,
    LFunction, // Same as Function, but as wide string.
    FuncDName,
    FuncSig,
    LFuncSig, // Same as FuncSig, but as wide string
    PrettyFunction,
    /// The same as PrettyFunction, except that the
    /// 'virtual' keyword is omitted for virtual member functions.
    PrettyFunctionNoVirtual
  };
```
(you can handle the wide string variants by making `strings_match` into a template.)


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

https://reviews.llvm.org/D148689



More information about the cfe-commits mailing list