Add .clang-format to repo for automated style

Add .clang-format to repo for automated style.  A consistent style
across Openbmc makes the code easier to read and edit.

Change-Id: I7c09792d2482f0be3e01776804347700f3e3e651
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/impl.hpp b/impl.hpp
index 520a7e0..15a9503 100644
--- a/impl.hpp
+++ b/impl.hpp
@@ -1,8 +1,9 @@
 #pragma once
 
-#include <cstddef>
 #include "store.hpp"
 
+#include <cstddef>
+
 namespace openpower
 {
 namespace vpd
@@ -18,8 +19,8 @@
     ASCII, /**< data encoded in ascii */
     RAW,   /**< raw data */
     // Keywords needing custom decoding
-    B1,     /**< The keyword B1 needs to be decoded specially */
-    UD      /**< Special decoding of UD meant for UUID */
+    B1, /**< The keyword B1 needs to be decoded specially */
+    UD  /**< Special decoding of UD meant for UUID */
 };
 
 } // namespace keyword
@@ -31,7 +32,7 @@
 using OffsetList = std::vector<uint32_t>;
 using KeywordMap = Parsed::mapped_type;
 
-}
+} // namespace internal
 
 /** @class Impl
  *  @brief Implements parser for OpenPOWER VPD
@@ -54,85 +55,84 @@
  */
 class Impl
 {
-    public:
-        Impl() = delete;
-        Impl(const Impl&) = delete;
-        Impl& operator=(const Impl&) = delete;
-        Impl(Impl&&) = delete;
-        Impl& operator=(Impl&&) = delete;
-        ~Impl() = default;
+  public:
+    Impl() = delete;
+    Impl(const Impl&) = delete;
+    Impl& operator=(const Impl&) = delete;
+    Impl(Impl&&) = delete;
+    Impl& operator=(Impl&&) = delete;
+    ~Impl() = default;
 
-        /** @brief Construct an Impl
-         *
-         *  @param[in] vpdBuffer - Binary OpenPOWER VPD
-         */
-        explicit Impl(Binary&& vpdBuffer)
-            : vpd(std::move(vpdBuffer)),
-              out{}
-        {}
+    /** @brief Construct an Impl
+     *
+     *  @param[in] vpdBuffer - Binary OpenPOWER VPD
+     */
+    explicit Impl(Binary&& vpdBuffer) : vpd(std::move(vpdBuffer)), out{}
+    {
+    }
 
-        /** @brief Run the parser on binary OpenPOWER VPD
-         *
-         *  @returns openpower::vpd::Store object
-         */
-        Store run();
+    /** @brief Run the parser on binary OpenPOWER VPD
+     *
+     *  @returns openpower::vpd::Store object
+     */
+    Store run();
 
-    private:
-        /** @brief Process the table of contents record, VHDR
-         *
-         *  @returns List of offsets to records in VPD
-         */
-        internal::OffsetList readTOC() const;
+  private:
+    /** @brief Process the table of contents record, VHDR
+     *
+     *  @returns List of offsets to records in VPD
+     */
+    internal::OffsetList readTOC() const;
 
-        /** @brief Read the PT keyword contained in the VHDR record,
-         *         to obtain offsets to other records in the VPD.
-         *
-         *  @param[in] iterator - iterator to buffer containing VPD
-         *  @param[in] ptLength - Length of PT keyword data
-         *
-         *  @returns List of offsets to records in VPD
-         */
-        internal::OffsetList readPT(Binary::const_iterator iterator,
-                                    std::size_t ptLen) const;
+    /** @brief Read the PT keyword contained in the VHDR record,
+     *         to obtain offsets to other records in the VPD.
+     *
+     *  @param[in] iterator - iterator to buffer containing VPD
+     *  @param[in] ptLength - Length of PT keyword data
+     *
+     *  @returns List of offsets to records in VPD
+     */
+    internal::OffsetList readPT(Binary::const_iterator iterator,
+                                std::size_t ptLen) const;
 
-        /** @brief Read VPD information contained within a record
-         *
-         *  @param[in] recordOffset - offset to a record location
-         *      within the binary OpenPOWER VPD
-         */
-        void processRecord(std::size_t recordOffset);
+    /** @brief Read VPD information contained within a record
+     *
+     *  @param[in] recordOffset - offset to a record location
+     *      within the binary OpenPOWER VPD
+     */
+    void processRecord(std::size_t recordOffset);
 
-        /** @brief Read keyword data
-         *
-         *  @param[in] keyword - OpenPOWER VPD keyword
-         *  @param[in] dataLength - Length of data to be read
-         *  @param[in] iterator - iterator pointing to a Keyword's data in
-         *      the VPD
-         *
-         *  @returns keyword data as a string
-         */
-        std::string readKwData(const internal::KeywordInfo& keyword,
-                               std::size_t dataLength,
-                               Binary::const_iterator iterator);
+    /** @brief Read keyword data
+     *
+     *  @param[in] keyword - OpenPOWER VPD keyword
+     *  @param[in] dataLength - Length of data to be read
+     *  @param[in] iterator - iterator pointing to a Keyword's data in
+     *      the VPD
+     *
+     *  @returns keyword data as a string
+     */
+    std::string readKwData(const internal::KeywordInfo& keyword,
+                           std::size_t dataLength,
+                           Binary::const_iterator iterator);
 
-        /** @brief While we're pointing at the keyword section of
-         *     a record in the VPD, this will read all contained
-         *     keywords and their values.
-         *
-         *  @param[in] iterator - iterator pointing to a Keyword in the VPD
-         *
-         *  @returns map of keyword:data
-         */
-        internal::KeywordMap readKeywords(Binary::const_iterator iterator);
+    /** @brief While we're pointing at the keyword section of
+     *     a record in the VPD, this will read all contained
+     *     keywords and their values.
+     *
+     *  @param[in] iterator - iterator pointing to a Keyword in the VPD
+     *
+     *  @returns map of keyword:data
+     */
+    internal::KeywordMap readKeywords(Binary::const_iterator iterator);
 
-        /** @brief Checks if the VHDR record is present in the VPD */
-        void checkHeader() const;
+    /** @brief Checks if the VHDR record is present in the VPD */
+    void checkHeader() const;
 
-        /** @brief OpenPOWER VPD in binary format */
-        Binary vpd;
+    /** @brief OpenPOWER VPD in binary format */
+    Binary vpd;
 
-        /** @brief parser output */
-        Parsed out;
+    /** @brief parser output */
+    Parsed out;
 };
 
 } // namespace parser