aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorFred Tingaud <frederic.tingaud@sonarsource.com>2022-05-03 09:29:16 +0200
committerMarco Antognini <marco.antognini@sonarsource.com>2022-05-03 11:31:50 +0200
commitad47114ad8500c78046161d492ac13a8e3e610eb (patch)
treea39042fa45090efc1b0b09162c9bca17afb532e9 /llvm/lib/Support/CommandLine.cpp
parentbc8e6012577bab2e94babec965f1ad10172432ec (diff)
downloadllvm-ad47114ad8500c78046161d492ac13a8e3e610eb.zip
llvm-ad47114ad8500c78046161d492ac13a8e3e610eb.tar.gz
llvm-ad47114ad8500c78046161d492ac13a8e3e610eb.tar.bz2
In MSVC compatibility mode, friend function declarations behave as function declarations
Before C++20, MSVC treated any friend function declaration as a function declaration, so the following code would compile despite funGlob being declared after its first call: ``` class Glob { public: friend void funGlob(); void test() { funGlob(); } }; void funGlob() {} ``` This proposed patch mimics the MSVC behavior when in MSVC compatibility mode Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D124613
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions