Skip to content

Commit 652aaa4

Browse files
committed
[NFC] Workaround MSVC miscompile in the autodiff attribute typechecking code
This miscompile leads to incorrect name being passed into the funcNameWithLoc parameter. It's reported here: https://developercommunity.visualstudio.com/t/miscompile-MSVC-C-compiler-incorrect/10546525
1 parent d6871ed commit 652aaa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5151,7 +5151,7 @@ enum class AbstractFunctionDeclLookupErrorKind {
51515151
/// Used for resolving the referenced declaration in `@derivative` and
51525152
/// `@transpose` attributes.
51535153
static AbstractFunctionDecl *findAutoDiffOriginalFunctionDecl(
5154-
DeclAttribute *attr, Type baseType, DeclNameRefWithLoc funcNameWithLoc,
5154+
DeclAttribute *attr, Type baseType, const DeclNameRefWithLoc &funcNameWithLoc,
51555155
DeclContext *lookupContext, NameLookupOptions lookupOptions,
51565156
const llvm::function_ref<
51575157
llvm::Optional<AbstractFunctionDeclLookupErrorKind>(

0 commit comments

Comments
 (0)