extern storage class was returning false from hasStaticStorage.
Ted, please review this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44515
91177308-0d34-0410-b5e6-
96231b3b80d8
// function) that lack a storage keyword are implicitly "static,"
// but are represented internally with a storage class of "None".
bool hasStaticStorage() const {
- return getStorageClass() == Static ||
- (getStorageClass() == None && getKind() == FileVar);
+ if (getStorageClass() == Static) return true;
+ return getKind() == FileVar;
}
// hasLocalStorage - Returns true if a variable with function scope
int *myPointer2 = myArray;
int *myPointer = &(myArray[2]);
+
+extern int x;
+void *g = &x;
+int *h = &x;
+