rcvalle added inline comments.

================
Comment at: clang/lib/AST/ItaniumMangle.cpp:2952
+  // u<length>u<type size>
+  if (NormalizeIntegers && T->isInteger()) {
+    if (T->isSignedInteger()) {
----------------
pcc wrote:
> `isInteger()` will return true for enums, but only if they are complete. This 
> would mean that code such as
> ```
> void (*f)(enum E *e);
> 
> void g() {
>   f(0);
> }
> ```
> would use a different encoding to call `f` depending on whether the TU 
> completes the enum `E`, if pointee types are considered part of the encoding.
Isn't `isIntegerType()` that does that? `isInteger()` definition is:

```
  bool isInteger() const {
    return getKind() >= Bool && getKind() <= Int128;
  }
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139395

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

Reply via email to