Skip to content

Commit 4c2dd82

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 (cherry picked from commit 652aaa4)
1 parent 5342ef1 commit 4c2dd82

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
@@ -4887,7 +4887,7 @@ enum class AbstractFunctionDeclLookupErrorKind {
48874887
/// Used for resolving the referenced declaration in `@derivative` and
48884888
/// `@transpose` attributes.
48894889
static AbstractFunctionDecl *findAutoDiffOriginalFunctionDecl(
4890-
DeclAttribute *attr, Type baseType, DeclNameRefWithLoc funcNameWithLoc,
4890+
DeclAttribute *attr, Type baseType, const DeclNameRefWithLoc &funcNameWithLoc,
48914891
DeclContext *lookupContext, NameLookupOptions lookupOptions,
48924892
const llvm::function_ref<
48934893
llvm::Optional<AbstractFunctionDeclLookupErrorKind>(

0 commit comments

Comments
 (0)