Skip to content

Commit

Permalink
Remove compiledb hack for C++20 concepts
Browse files Browse the repository at this point in the history
Reviewed By: mpage

Differential Revision: D50952145

fbshipit-source-id: 3ae8d6acb6183c49ef95fd246c6c9186cd1f0f0f
  • Loading branch information
jbower-fb authored and facebook-github-bot committed Nov 2, 2023
1 parent 5b38a13 commit 82b2f32
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Jit/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ struct FreeDeleter {
template <typename T>
using unique_c_ptr = std::unique_ptr<T, FreeDeleter>;

// TODO(T132146975) The clangd we're using at Meta for LSP gets very upset if we
// try to use C++20 Concepts and fails to compile most further code. So we
// shoehorn -D__BUILT_VIA_COMPILE_COMMANDS_JSON into our compile_commands.json
// to avoid this. Not a great solution but at least gets most things working.
#ifdef __BUILT_VIA_COMPILE_COMMANDS_JSON

#define REQUIRES_CALLABLE(...)

#else // not defined __BUILT_VIA_COMPILE_COMMANDS_JSON
#include <concepts>

#define REQUIRES_CALLABLE(...) requires jit::Callable<__VA_ARGS__>
Expand All @@ -252,8 +243,6 @@ concept Callable = requires(F f, Args&&... args) {
{ f(std::forward<Args>(args)...) } -> std::convertible_to<Ret>;
};

#endif

template <class T>
class ScopeExit {
public:
Expand Down

0 comments on commit 82b2f32

Please sign in to comment.