[all-commits] [llvm/llvm-project] 178c2b: Correctly diagnose taking the address of a registe...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Thu Jul 22 11:53:41 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 178c2b4c1eb12b2153adb384ac7f22a8791edc86
https://github.com/llvm/llvm-project/commit/178c2b4c1eb12b2153adb384ac7f22a8791edc86
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2021-07-22 (Thu, 22 Jul 2021)
Changed paths:
M clang/lib/Sema/Sema.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/test/Sema/expr-address-of.c
Log Message:
-----------
Correctly diagnose taking the address of a register variable in C
We caught the cases where the user would explicitly use the & operator,
but we were missing implicit conversions such as array decay.
Fixes PR26336. Thanks to Samuel Neves for inspiration for the patch.
More information about the All-commits
mailing list