[clang] [clang] assume_aligned incorrectly diagnoses a dependent return type (PR #111573)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 11:31:23 PDT 2024
================
@@ -52,6 +52,9 @@ T *atest3() __attribute__((assume_aligned(31, o))); // expected-error {{requeste
template <typename T, int o>
T *atest4() __attribute__((assume_aligned(32, o)));
+template<typename T>
+T atest5(int) __attribute__((assume_aligned(2)));
----------------
erichkeane wrote:
This change causes a number of attributes to change their behavior (see all uses of `isValidPointerAttrType`), so we should test each of those.
Additionally, we should separately check (via a different declaration) that the diagnostic fires when instantiated.
https://github.com/llvm/llvm-project/pull/111573
More information about the cfe-commits
mailing list