Skip to content

[clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. #68618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,8 @@ Bug Fixes in This Version
- Fixed false positive error emitted by clang when performing qualified name
lookup and the current class instantiation has dependent bases.
Fixes (`#13826 <https://github.com/llvm/llvm-project/issues/13826>`_)
- Fixes compile error that double colon operator cannot resolve macro with parentheses.
Fixes (`#64467 <https://github.com/llvm/llvm-project/issues/64467>`_)- Clang now properly diagnoses use of stand-alone OpenMP directives after a
- Clang's ``-Wchar-subscripts`` no longer warns on chars whose values are known non-negative constants.
Fixes (`#18763 <https://github.com/llvm/llvm-project/issues/18763>`_)

Expand Down
22 changes: 11 additions & 11 deletions clang/lib/Headers/bmiintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
to use it as a potentially faster version of BSF. */
#define __RELAXED_FN_ATTRS __attribute__((__always_inline__, __nodebug__))

#define _tzcnt_u16(a) (__tzcnt_u16((a)))
#define _tzcnt_u16 __tzcnt_u16

/// Counts the number of trailing zero bits in the operand.
///
Expand Down Expand Up @@ -71,7 +71,7 @@ _mm_tzcnt_32(unsigned int __X)
return (int)__builtin_ia32_tzcnt_u32(__X);
}

#define _tzcnt_u32(a) (__tzcnt_u32((a)))
#define _tzcnt_u32 __tzcnt_u32

#ifdef __x86_64__

Expand Down Expand Up @@ -109,7 +109,7 @@ _mm_tzcnt_64(unsigned long long __X)
return (long long)__builtin_ia32_tzcnt_u64(__X);
}

#define _tzcnt_u64(a) (__tzcnt_u64((a)))
#define _tzcnt_u64 __tzcnt_u64

#endif /* __x86_64__ */

Expand All @@ -121,14 +121,14 @@ _mm_tzcnt_64(unsigned long long __X)
/* Define the default attributes for the functions in this file. */
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi")))

#define _andn_u32(a, b) (__andn_u32((a), (b)))
#define _andn_u32 __andn_u32

/* _bextr_u32 != __bextr_u32 */
#define _blsi_u32(a) (__blsi_u32((a)))
#define _blsi_u32 __blsi_u32

#define _blsmsk_u32(a) (__blsmsk_u32((a)))
#define _blsmsk_u32 __blsmsk_u32

#define _blsr_u32(a) (__blsr_u32((a)))
#define _blsr_u32 __blsr_u32

/// Performs a bitwise AND of the second operand with the one's
/// complement of the first operand.
Expand Down Expand Up @@ -272,14 +272,14 @@ __blsr_u32(unsigned int __X)

#ifdef __x86_64__

#define _andn_u64(a, b) (__andn_u64((a), (b)))
#define _andn_u64 __andn_u64

/* _bextr_u64 != __bextr_u64 */
#define _blsi_u64(a) (__blsi_u64((a)))
#define _blsi_u64 __blsi_u64

#define _blsmsk_u64(a) (__blsmsk_u64((a)))
#define _blsmsk_u64 __blsmsk_u64

#define _blsr_u64(a) (__blsr_u64((a)))
#define _blsr_u64 __blsr_u64

/// Performs a bitwise AND of the second operand with the one's
/// complement of the first operand.
Expand Down