Skip to content

Commit

Permalink
Fix detection of gcc version in models
Browse files Browse the repository at this point in the history
Summary:public
clang-format changed filename inside __has_include(<FILENAME>), turn off
clang format for that part of the code.

Reviewed By: jberdine

Differential Revision: D3133593

fb-gh-sync-id: c601514
fbshipit-source-id: c601514
  • Loading branch information
Andrzej Kotulski authored and Facebook Github Bot 9 committed Apr 5, 2016
1 parent 7166a48 commit bfde405
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion infer/models/cpp/include/infer_model/portability.h
Expand Up @@ -12,11 +12,13 @@
// https://github.com/facebook/folly/blob/b1eb6819f3ffe6b645f39d505ca8ace3116b7873/folly/configure.ac#L232
// Depending whether the project is compiled with libc++ or stdlibc++, include their
// internal config headers to get information about versions
// clang-format off
#if __has_include(<__config>) // defines _LIBCPP_VERSION
#include <__config>
#elif __has_include(<bits / c++ config.h>) // defines __GLIBCXX__
#elif __has_include(<bits/c++config.h>) // defines __GLIBCXX__
#include <bits/c++config.h>
#endif
// clang-format on

// Figure out whether the library really supports c++11 standard
#if __cplusplus >= 201103L
Expand Down

0 comments on commit bfde405

Please sign in to comment.