We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e41aaf5 commit 8b09196Copy full SHA for 8b09196
clang/lib/AST/ByteCode/Pointer.h
@@ -341,6 +341,8 @@ class Pointer {
341
QualType getType() const {
342
if (isTypeidPointer())
343
return QualType(Typeid.TypeInfoType, 0);
344
+ if (isFunctionPointer())
345
+ return asFunctionPointer().getFunction()->getDecl()->getType();
346
347
if (inPrimitiveArray() && Offset != asBlockPointer().Base) {
348
// Unfortunately, complex and vector types are not array types in clang,
clang/test/AST/ByteCode/functions.cpp
@@ -732,3 +732,8 @@ namespace LocalVarForParmVarDecl {
732
}
733
static_assert(foo(), "");
734
735
+
736
+namespace PtrPtrCast {
737
+ void foo() { ; }
738
+ void bar(int *a) { a = (int *)(void *)(foo); }
739
+}
0 commit comments